diff options
author | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2018-12-17 19:29:27 +0000 |
---|---|---|
committer | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2018-12-17 19:29:27 +0000 |
commit | 20b6772f9f70f3fce39ec18a0e25ba85aff094fe (patch) | |
tree | 9666fa5c8b8527aa46eccd7f6e1e9fa724f5c353 /lib/Driver/ToolChains/Darwin.cpp | |
parent | 228f2c50c5313094fa41671e6ac2d1548db7d19d (diff) |
[Driver] Don't override '-march' when using '-arch x86_64h'
On Darwin, using '-arch x86_64h' would always override the option passed
through '-march'.
This patch allows users to use '-march' with x86_64h, while keeping the
default to 'core-avx2'
Differential Revision: https://reviews.llvm.org/D55775
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@349381 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/ToolChains/Darwin.cpp')
-rw-r--r-- | lib/Driver/ToolChains/Darwin.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/Driver/ToolChains/Darwin.cpp b/lib/Driver/ToolChains/Darwin.cpp index 0cc187ab47..4e306fd960 100644 --- a/lib/Driver/ToolChains/Darwin.cpp +++ b/lib/Driver/ToolChains/Darwin.cpp @@ -2017,12 +2017,8 @@ DerivedArgList *MachO::TranslateArgs(const DerivedArgList &Args, else if (Name == "pentIIm3") DAL->AddJoinedArg(nullptr, MArch, "pentium2"); - else if (Name == "x86_64") + else if (Name == "x86_64" || Name == "x86_64h") DAL->AddFlagArg(nullptr, Opts.getOption(options::OPT_m64)); - else if (Name == "x86_64h") { - DAL->AddFlagArg(nullptr, Opts.getOption(options::OPT_m64)); - DAL->AddJoinedArg(nullptr, MArch, "x86_64h"); - } else if (Name == "arm") DAL->AddJoinedArg(nullptr, MArch, "armv4t"); |