Skip to content

Commit f8acd72

Browse files
committedSep 10, 2018
[clang-cl] Enable -march option
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 llvm-svn: 341847
1 parent db62913 commit f8acd72

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed
 

‎clang/include/clang/Driver/Options.td

+1-1
Original file line numberDiff line numberDiff line change
@@ -1931,7 +1931,7 @@ def mappletvsimulator_version_min_EQ : Joined<["-"], "mappletvsimulator-version-
19311931
def mwatchos_version_min_EQ : Joined<["-"], "mwatchos-version-min=">, Group<m_Group>;
19321932
def mwatchos_simulator_version_min_EQ : Joined<["-"], "mwatchos-simulator-version-min=">;
19331933
def mwatchsimulator_version_min_EQ : Joined<["-"], "mwatchsimulator-version-min=">, Alias<mwatchos_simulator_version_min_EQ>;
1934-
def march_EQ : Joined<["-"], "march=">, Group<m_Group>;
1934+
def march_EQ : Joined<["-"], "march=">, Group<m_Group>, Flags<[CoreOption]>;
19351935
def masm_EQ : Joined<["-"], "masm=">, Group<m_Group>, Flags<[DriverOption]>;
19361936
def mcmodel_EQ : Joined<["-"], "mcmodel=">, Group<m_Group>;
19371937
def mimplicit_it_EQ : Joined<["-"], "mimplicit-it=">, Group<m_Group>;

‎clang/test/Driver/cl-options.c

+1
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,7 @@
610610
// RUN: -flto \
611611
// RUN: -fmerge-all-constants \
612612
// RUN: -no-canonical-prefixes \
613+
// RUN: -march=skylake \
613614
// RUN: --version \
614615
// RUN: -Werror /Zs -- %s 2>&1
615616

0 commit comments

Comments
 (0)
Please sign in to comment.