]> granicus.if.org Git - clang/commitdiff
[clang-cl] Enable -march option
authorAlexandre Ganea <alexandre.ganea@ubisoft.com>
Mon, 10 Sep 2018 17:54:32 +0000 (17:54 +0000)
committerAlexandre Ganea <alexandre.ganea@ubisoft.com>
Mon, 10 Sep 2018 17:54:32 +0000 (17:54 +0000)
This change allows usage of -march when using the clang-cl driver. This is similar to MSVC's /arch; however -march can target precisely all supported CPUs, while /arch has a more restricted set.

Differential Revision: https://reviews.llvm.org/D51806

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@341847 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Driver/Options.td
test/Driver/cl-options.c

index 32038dc7334c65ed8887a589ec0922d4494dbb5d..e1c284447ca4ed6c7003948f1c5546348e3d678f 100644 (file)
@@ -1931,7 +1931,7 @@ def mappletvsimulator_version_min_EQ : Joined<["-"], "mappletvsimulator-version-
 def mwatchos_version_min_EQ : Joined<["-"], "mwatchos-version-min=">, Group<m_Group>;
 def mwatchos_simulator_version_min_EQ : Joined<["-"], "mwatchos-simulator-version-min=">;
 def mwatchsimulator_version_min_EQ : Joined<["-"], "mwatchsimulator-version-min=">, Alias<mwatchos_simulator_version_min_EQ>;
-def march_EQ : Joined<["-"], "march=">, Group<m_Group>;
+def march_EQ : Joined<["-"], "march=">, Group<m_Group>, Flags<[CoreOption]>;
 def masm_EQ : Joined<["-"], "masm=">, Group<m_Group>, Flags<[DriverOption]>;
 def mcmodel_EQ : Joined<["-"], "mcmodel=">, Group<m_Group>;
 def mimplicit_it_EQ : Joined<["-"], "mimplicit-it=">, Group<m_Group>;
index c251380f98d84f39264db293bd6aebddb18248dc..851da9f5fbc1cf5197e8094c5ec99961ad1ffca1 100644 (file)
 // RUN:     -flto \
 // RUN:     -fmerge-all-constants \
 // RUN:     -no-canonical-prefixes \
+// RUN:     -march=skylake \
 // RUN:     --version \
 // RUN:     -Werror /Zs -- %s 2>&1