binary --sysroot variant.

This commit is contained in:
Ian A. Mason 2019-01-03 12:41:31 -08:00
parent df3a1a7b5f
commit 6fa871fa6c

View File

@ -118,6 +118,8 @@ func parse(argList []string) parserResult {
"-integrated-as": {0, pr.compileUnaryCallback}, "-integrated-as": {0, pr.compileUnaryCallback},
"-no-canonical-prefixes": {0, pr.compileLinkUnaryCallback}, "-no-canonical-prefixes": {0, pr.compileLinkUnaryCallback},
"--sysroot": {1, pr.compileLinkBinaryCallback}, //iam: musl stuff
//<archaic flags> //<archaic flags>
"-no-cpp-precomp": {0, pr.compileUnaryCallback}, "-no-cpp-precomp": {0, pr.compileUnaryCallback},
//</archaic flags> //</archaic flags>
@ -318,7 +320,6 @@ func parse(argList []string) parserResult {
} }
if !matched { if !matched {
LogWarning("Did not recognize the compiler flag: %v\n", elem) LogWarning("Did not recognize the compiler flag: %v\n", elem)
//LogWarning("CC %v\n", pr.InputList)
pr.compileUnaryCallback(elem, argList[1:1]) pr.compileUnaryCallback(elem, argList[1:1])
} }
argList = argList[1+listShift:] argList = argList[1+listShift:]
@ -443,3 +444,8 @@ func (pr *parserResult) compileLinkUnaryCallback(flag string, _ []string) {
pr.LinkArgs = append(pr.LinkArgs, flag) pr.LinkArgs = append(pr.LinkArgs, flag)
pr.CompileArgs = append(pr.CompileArgs, flag) pr.CompileArgs = append(pr.CompileArgs, flag)
} }
func (pr *parserResult) compileLinkBinaryCallback(flag string, args []string) {
pr.LinkArgs = append(pr.LinkArgs, flag, args[0])
pr.CompileArgs = append(pr.CompileArgs, flag, args[0])
}