From 307ea19e1087ce92df2af259ce5d3baba11b9042 Mon Sep 17 00:00:00 2001 From: "Ian A. Mason" Date: Wed, 9 May 2018 07:07:56 -0700 Subject: [PATCH] Fix for issue #17. --- shared/extractor.go | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/shared/extractor.go b/shared/extractor.go index 545dd50..59837d8 100644 --- a/shared/extractor.go +++ b/shared/extractor.go @@ -150,16 +150,24 @@ func parseSwitches() (ea extractionArgs) { if *archiverNamePtr != "" { ea.ArchiverName = *archiverNamePtr } else { - if LLVMARName != "" { - ea.ArchiverName = filepath.Join(LLVMToolChainBinDir, LLVMARName) + if LLVMToolChainBinDir != "" { + if LLVMARName != "" { + ea.ArchiverName = filepath.Join(LLVMToolChainBinDir, LLVMARName) + } else { + ea.ArchiverName = filepath.Join(LLVMToolChainBinDir, ea.ArchiverName) + } } } if *linkerNamePtr != "" { ea.LinkerName = *linkerNamePtr } else { - if LLVMLINKName != "" { - ea.LinkerName = filepath.Join(LLVMToolChainBinDir, LLVMLINKName) + if LLVMToolChainBinDir != "" { + if LLVMLINKName != "" { + ea.LinkerName = filepath.Join(LLVMToolChainBinDir, LLVMLINKName) + } else { + ea.LinkerName = filepath.Join(LLVMToolChainBinDir, ea.LinkerName) + } } }