File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -625,7 +625,14 @@ impl Step for TestHelpers {
625
625
if builder. config . dry_run {
626
626
return ;
627
627
}
628
- let target = self . target ;
628
+ // The x86_64-fortanix-unknown-sgx target doesn't have a working C
629
+ // toolchain. However, some x86_64 ELF objects can be linked
630
+ // without issues. Use this hack to compile the test helpers.
631
+ let target = if self . target == "x86_64-fortanix-unknown-sgx" {
632
+ TargetSelection :: from_user ( "x86_64-unknown-linux-gnu" )
633
+ } else {
634
+ self . target
635
+ } ;
629
636
let dst = builder. test_helpers_out ( target) ;
630
637
let src = builder. src . join ( "src/test/auxiliary/rust_test_helpers.c" ) ;
631
638
if up_to_date ( & src, & dst. join ( "librust_test_helpers.a" ) ) {
@@ -649,7 +656,6 @@ impl Step for TestHelpers {
649
656
}
650
657
cfg. compiler ( builder. cc ( target) ) ;
651
658
}
652
-
653
659
cfg. cargo_metadata ( false )
654
660
. out_dir ( & dst)
655
661
. target ( & target. triple )
You can’t perform that action at this time.
0 commit comments