use TOOLS_PATH env variable for archiver and linker

This commit is contained in:
Loic Gelle 2017-06-27 09:50:12 -07:00
parent e32b3bfeb4
commit eb5de09ac2

View File

@ -58,10 +58,18 @@ func parseExtractingArgs(args []string) ExtractingArgs {
// Checking environment variables // Checking environment variables
if ln := os.Getenv(LINKER_NAME); ln != "" { if ln := os.Getenv(LINKER_NAME); ln != "" {
ea.LinkerName = ln if toolsPath := os.Getenv(TOOLS_PATH); toolsPath != "" {
ea.LinkerName = toolsPath + ln
} else {
ea.LinkerName = ln
}
} }
if an := os.Getenv(AR_NAME); an != "" { if an := os.Getenv(AR_NAME); an != "" {
ea.ArchiverName = an if toolsPath := os.Getenv(TOOLS_PATH); toolsPath != "" {
ea.ArchiverName = toolsPath + an
} else {
ea.ArchiverName = an
}
} }
// Parsing cli input // Parsing cli input