|
| 1 | +diff --git a/config/clang/BUILD.gn b/config/clang/BUILD.gn |
| 2 | +index c38670a..5911f4b 100644 |
| 3 | +--- a/config/clang/BUILD.gn |
| 4 | ++++ b/config/clang/BUILD.gn |
| 5 | +@@ -183,7 +183,7 @@ template("clang_lib") { |
| 6 | + } else if (current_cpu == "arm64") { |
| 7 | + _suffix = "-aarch64" |
| 8 | + } else { |
| 9 | +- assert(false) # Unhandled cpu type |
| 10 | ++ # Unhandled cpu type |
| 11 | + } |
| 12 | + } else if (is_apple) { |
| 13 | + _dir = "darwin" |
| 14 | +@@ -205,7 +205,7 @@ template("clang_lib") { |
| 15 | + } else if (current_cpu == "s390x") { |
| 16 | + _dir = "s390x-unknown-linux-gnu" |
| 17 | + } else { |
| 18 | +- assert(false) # Unhandled cpu type |
| 19 | ++ # Unhandled cpu type |
| 20 | + } |
| 21 | + } else if (is_fuchsia) { |
| 22 | + if (current_cpu == "x64") { |
| 23 | +@@ -213,7 +213,7 @@ template("clang_lib") { |
| 24 | + } else if (current_cpu == "arm64") { |
| 25 | + _dir = "aarch64-unknown-fuchsia" |
| 26 | + } else { |
| 27 | +- assert(false) # Unhandled cpu type |
| 28 | ++ # Unhandled cpu type |
| 29 | + } |
| 30 | + } else if (is_android) { |
| 31 | + _dir = "linux" |
| 32 | +@@ -228,15 +228,20 @@ template("clang_lib") { |
| 33 | + } else if (current_cpu == "riscv64") { |
| 34 | + _suffix = "-riscv64-android" |
| 35 | + } else { |
| 36 | +- assert(false) # Unhandled cpu type |
| 37 | ++ # Unhandled cpu type |
| 38 | + } |
| 39 | + } else { |
| 40 | +- assert(false) # Unhandled target platform |
| 41 | ++ # Unhandled target platform |
| 42 | + } |
| 43 | + |
| 44 | + _clang_lib_dir = "$clang_base_path/lib/clang/$clang_version/lib" |
| 45 | + _lib_file = "${_prefix}clang_rt.${_libname}${_suffix}.${_ext}" |
| 46 | +- libs = [ "$_clang_lib_dir/$_dir/$_lib_file" ] |
| 47 | ++ if (_dir != "") { |
| 48 | ++ libs = [ "$_clang_lib_dir/$_dir/$_lib_file" ] |
| 49 | ++ } else { |
| 50 | ++ print("WARNING: No clang runtime library for $target_os/$current_cpu") |
| 51 | ++ print("$_clang_lib_dir/????/$_lib_file") |
| 52 | ++ } |
| 53 | + } |
| 54 | + } |
| 55 | + } |
0 commit comments