File tree 1 file changed +10
-0
lines changed
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -471,6 +471,12 @@ mod c_system {
471
471
output
472
472
}
473
473
474
+ // This can be obtained by adding the line:
475
+ // message(STATUS "All builtin supported architectures: ${ALL_BUILTIN_SUPPORTED_ARCH}")
476
+ // to the bottom of compiler-rt/cmake/builtin-config-ix.cmake, then running
477
+ // cmake and looking at the output.
478
+ const ALL_SUPPORTED_ARCHES : & ' static str = "i386;x86_64;arm;armhf;armv6m;armv7m;armv7em;armv7;armv7s;armv7k;aarch64;hexagon;mips;mipsel;mips64;mips64el;powerpc64;powerpc64le;riscv32;riscv64;wasm32;wasm64" ;
479
+
474
480
// This function recreates the logic of getArchNameForCompilerRTLib,
475
481
// defined in clang/lib/Driver/ToolChain.cpp.
476
482
fn get_arch_name_for_compiler_rtlib ( ) -> String {
@@ -499,6 +505,10 @@ mod c_system {
499
505
let target_os = env:: var ( "CARGO_CFG_TARGET_OS" ) . unwrap ( ) ;
500
506
let compiler_rt_arch = get_arch_name_for_compiler_rtlib ( ) ;
501
507
508
+ if ALL_SUPPORTED_ARCHES . split ( ";" ) . find ( |x| * x == compiler_rt_arch) == None {
509
+ return ;
510
+ }
511
+
502
512
if let Ok ( clang) = env:: var ( "CLANG" ) {
503
513
let output = success_output (
504
514
"failed to find clang's compiler-rt" ,
You can’t perform that action at this time.
0 commit comments