File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -607,6 +607,10 @@ valopt aarch64-linux-android-ndk "" "aarch64-linux-android NDK standalone path"
607
607
valopt release-channel " dev" " the name of the release channel to build"
608
608
valopt musl-root " /usr/local" " MUSL root installation directory"
609
609
610
+ # Used on systems where "cc" and "ar" are unavailable
611
+ valopt default-linker " cc" " the default linker"
612
+ valopt default-ar " ar" " the default ar"
613
+
610
614
# Many of these are saved below during the "writing configuration" step
611
615
# (others are conditionally saved).
612
616
opt_nosave manage-submodules 1 " let the build manage the git submodules"
Original file line number Diff line number Diff line change 13
13
# this exists can be found on issue #2400
14
14
export CFG_COMPILER_HOST_TRIPLE
15
15
16
+ # Used as defaults for the runtime ar and cc tools
17
+ export CFG_DEFAULT_LINKER
18
+ export CFG_DEFAULT_AR
19
+
16
20
# The standard libraries should be held up to a higher standard than any old
17
21
# code, make sure that these common warnings are denied by default. These can
18
22
# be overridden during development temporarily. For stage0, we allow warnings
Original file line number Diff line number Diff line change @@ -185,8 +185,8 @@ impl Default for TargetOptions {
185
185
fn default ( ) -> TargetOptions {
186
186
TargetOptions {
187
187
data_layout : String :: new ( ) ,
188
- linker : " cc". to_string ( ) ,
189
- ar : " ar". to_string ( ) ,
188
+ linker : option_env ! ( "CFG_DEFAULT_LINKER" ) . unwrap_or ( " cc") . to_string ( ) ,
189
+ ar : option_env ! ( "CFG_DEFAULT_AR" ) . unwrap_or ( " ar") . to_string ( ) ,
190
190
pre_link_args : Vec :: new ( ) ,
191
191
post_link_args : Vec :: new ( ) ,
192
192
cpu : "generic" . to_string ( ) ,
You can’t perform that action at this time.
0 commit comments