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 @@ -474,6 +474,12 @@ mod c_system {
474
474
output
475
475
}
476
476
477
+ // This can be obtained by adding the line:
478
+ // message(STATUS "All builtin supported architectures: ${ALL_BUILTIN_SUPPORTED_ARCH}")
479
+ // to the bottom of compiler-rt/cmake/builtin-config-ix.cmake, then running
480
+ // cmake and looking at the output.
481
+ 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" ;
482
+
477
483
// This function recreates the logic of getArchNameForCompilerRTLib,
478
484
// defined in clang/lib/Driver/ToolChain.cpp.
479
485
fn get_arch_name_for_compiler_rtlib ( ) -> String {
@@ -502,6 +508,10 @@ mod c_system {
502
508
let target_os = env:: var ( "CARGO_CFG_TARGET_OS" ) . unwrap ( ) ;
503
509
let compiler_rt_arch = get_arch_name_for_compiler_rtlib ( ) ;
504
510
511
+ if ALL_SUPPORTED_ARCHES . split ( ";" ) . find ( |x| * x == compiler_rt_arch) == None {
512
+ return ;
513
+ }
514
+
505
515
if let Ok ( clang) = env:: var ( "CLANG" ) {
506
516
let output = success_output (
507
517
"failed to find clang's compiler-rt" ,
You can’t perform that action at this time.
0 commit comments