r341847 - [clang-cl] Enable -march option
Alexandre Ganea via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 10 10:54:32 PDT 2018
Author: aganea
Date: Mon Sep 10 10:54:32 2018
New Revision: 341847
URL: http://llvm.org/viewvc/llvm-project?rev=341847&view=rev
Log:
[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
Modified:
cfe/trunk/include/clang/Driver/Options.td
cfe/trunk/test/Driver/cl-options.c
Modified: cfe/trunk/include/clang/Driver/Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=341847&r1=341846&r2=341847&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/Options.td (original)
+++ cfe/trunk/include/clang/Driver/Options.td Mon Sep 10 10:54:32 2018
@@ -1931,7 +1931,7 @@ def mappletvsimulator_version_min_EQ : J
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>;
Modified: cfe/trunk/test/Driver/cl-options.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/cl-options.c?rev=341847&r1=341846&r2=341847&view=diff
==============================================================================
--- cfe/trunk/test/Driver/cl-options.c (original)
+++ cfe/trunk/test/Driver/cl-options.c Mon Sep 10 10:54:32 2018
@@ -610,6 +610,7 @@
// RUN: -flto \
// RUN: -fmerge-all-constants \
// RUN: -no-canonical-prefixes \
+// RUN: -march=skylake \
// RUN: --version \
// RUN: -Werror /Zs -- %s 2>&1
More information about the cfe-commits
mailing list