Skip to content

Commit

Permalink
C: Fix a minor issue with C.Toolchain initialization order under cert…
Browse files Browse the repository at this point in the history
…ain circumstances
  • Loading branch information
jjensen committed Feb 6, 2017
1 parent 0aedac9 commit 980c6d8
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions bin/modules/c.jam
Expand Up @@ -1681,7 +1681,7 @@ rule C.OverrideToolchainSpec TOOLCHAIN_SPEC_OPTIONS : OPTIONS {
}


rule C.Toolchain TOOLCHAIN_SPEC {
rule _C.ToolchainHelper TOOLCHAIN_SPEC {
# Null out any existing toolchain spec options.
local keyValue ;
for keyValue in $(TOOLCHAIN_SPEC_OPTIONS:Z=$(C.ACTIVE_TOOLCHAIN_GRIST)) {
Expand Down Expand Up @@ -1765,6 +1765,14 @@ rule C.Toolchain TOOLCHAIN_SPEC {
return $(C.ACTIVE_TOOLCHAIN_SPEC) ;
}

rule C.Toolchain TOOLCHAIN_SPEC {
if ! $(TOOLCHAIN_SPEC) {
Exit * C.Toolchain called with an empty invalid TOOLCHAIN_SPEC. ;
}
return [ _C.ToolchainHelper $(TOOLCHAIN_SPEC) ] ;
}


########################################################################
########################################################################

Expand Down Expand Up @@ -1793,6 +1801,6 @@ if ! $(C.ACTIVE_TOOLCHAIN_GRIST) {
} else {
C.TOOLCHAIN = $(C.PLATFORM)/$(C.CONFIG) ;
}
C.Toolchain $(C.TOOLCHAIN) ;
_C.ToolchainHelper $(C.TOOLCHAIN) ;
}

0 comments on commit 980c6d8

Please sign in to comment.