-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
117 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- a/build/config/clang/BUILD.gn | ||
+++ b/build/config/clang/BUILD.gn | ||
@@ -227,7 +227,32 @@ | ||
assert(false) # Unhandled target platform | ||
} | ||
|
||
- _clang_lib_dir = "$clang_base_path/lib/clang/$clang_version/lib" | ||
+ if (is_linux && (clang_base_path != default_clang_base_path)) { | ||
+ _dir = "linux" | ||
+ if (current_cpu == "x64") { | ||
+ _suffix = "-x86_64" | ||
+ } else if (current_cpu == "x86") { | ||
+ _suffix = "-i386" | ||
+ } else if (current_cpu == "arm64") { | ||
+ _suffix = "-aarch64" | ||
+ } else if (current_cpu == "arm") { | ||
+ _suffix = "-arm" | ||
+ } else { | ||
+ assert(false) # Unhandled cpu type | ||
+ } | ||
+ } | ||
+ | ||
+ _maybe_clang_base_path = clang_base_path | ||
+ _maybe_clang_version = clang_version | ||
+ if (is_android && (clang_base_path != default_clang_base_path)) { | ||
+ if (android_ndk_clang_version == "") { | ||
+ assert(false) | ||
+ } | ||
+ _maybe_clang_version = android_ndk_clang_version | ||
+ _maybe_clang_base_path = "$android_toolchain_root" | ||
+ } | ||
+ | ||
+ _clang_lib_dir = "$_maybe_clang_base_path/lib/clang/$_maybe_clang_version/lib" | ||
_lib_file = "${_prefix}clang_rt.${_libname}${_suffix}.${_ext}" | ||
libs = [ "$_clang_lib_dir/$_dir/$_lib_file" ] | ||
} | ||
--- a/build/config/clang/clang.gni | ||
+++ b/build/config/clang/clang.gni | ||
@@ -39,6 +39,8 @@ | ||
# Set to true to enable output of ThinLTO index and import files used for | ||
# creating a Chromium MLGO corpus in the ThinLTO case. | ||
lld_emit_indexes_and_imports = false | ||
+ | ||
+ android_ndk_clang_version = "" | ||
} | ||
|
||
# We don't really need to collect a corpus for the host tools, just for the target. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- a/build/config/compiler/BUILD.gn | ||
+++ b/build/config/compiler/BUILD.gn | ||
@@ -1913,6 +1913,11 @@ | ||
} | ||
} | ||
|
||
+ cflags += [ | ||
+ "-Wno-unknown-warning-option", | ||
+ "-Wno-unknown-pragmas", | ||
+ ] | ||
+ | ||
# Rust warnings | ||
|
||
# Require `unsafe` blocks even in `unsafe` fns. This is intended to become |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- a/build.rs | ||
+++ b/build.rs | ||
@@ -259,11 +259,17 @@ | ||
"x64" | ||
} else if target_arch == "aarch64" { | ||
"arm64" | ||
+ } else if target_arch == "arm" { | ||
+ "arm" | ||
+ } else if target_triple.starts_with("i686-") { | ||
+ "x86" | ||
} else { | ||
"unknown" | ||
}; | ||
if target_arch == "x86_64" { | ||
maybe_install_sysroot("amd64"); | ||
+ } else if target_triple.starts_with("i686-") { | ||
+ maybe_install_sysroot("i386"); | ||
} | ||
gn_args.push(format!(r#"v8_target_cpu="{}""#, arch).to_string()); | ||
gn_args.push(format!(r#"target_cpu="{}""#, arch).to_string()); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters