From: Alexandre Ganea Date: Mon, 10 Sep 2018 17:54:32 +0000 (+0000) Subject: [clang-cl] Enable -march option X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=86148aee510bfc90366d575498198e43d0cc2892;p=clang [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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@341847 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td index 32038dc733..e1c284447c 100644 --- a/include/clang/Driver/Options.td +++ b/include/clang/Driver/Options.td @@ -1931,7 +1931,7 @@ def mappletvsimulator_version_min_EQ : Joined<["-"], "mappletvsimulator-version- def mwatchos_version_min_EQ : Joined<["-"], "mwatchos-version-min=">, Group; def mwatchos_simulator_version_min_EQ : Joined<["-"], "mwatchos-simulator-version-min=">; def mwatchsimulator_version_min_EQ : Joined<["-"], "mwatchsimulator-version-min=">, Alias; -def march_EQ : Joined<["-"], "march=">, Group; +def march_EQ : Joined<["-"], "march=">, Group, Flags<[CoreOption]>; def masm_EQ : Joined<["-"], "masm=">, Group, Flags<[DriverOption]>; def mcmodel_EQ : Joined<["-"], "mcmodel=">, Group; def mimplicit_it_EQ : Joined<["-"], "mimplicit-it=">, Group; diff --git a/test/Driver/cl-options.c b/test/Driver/cl-options.c index c251380f98..851da9f5fb 100644 --- a/test/Driver/cl-options.c +++ b/test/Driver/cl-options.c @@ -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