From: Dan Gohman Date: Fri, 2 Dec 2016 01:12:40 +0000 (+0000) Subject: [WebAssembly] Add an -mdirect flag for the direct wasm object feature. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=070f9f11c2d556f7657474779c969c9461f9302f;p=clang [WebAssembly] Add an -mdirect flag for the direct wasm object feature. Add a target flag for enabling the new direct wasm object emission feature. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288447 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td index 316eafd683..0e58487a90 100644 --- a/include/clang/Driver/Options.td +++ b/include/clang/Driver/Options.td @@ -1613,6 +1613,8 @@ def ffixed_x18 : Flag<["-"], "ffixed-x18">, Group, def msimd128 : Flag<["-"], "msimd128">, Group; def mno_simd128 : Flag<["-"], "mno-simd128">, Group; +def mdirect : Flag<["-"], "mdirect">, Group; +def mno_direct : Flag<["-"], "mno-direct">, Group; def mamdgpu_debugger_abi : Joined<["-"], "mamdgpu-debugger-abi=">, Flags<[HelpHidden]>, diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index 9a74cdf6f2..8e026bf00e 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -8019,6 +8019,10 @@ private: SIMDLevel = std::min(SIMDLevel, SIMDEnum(SIMD128 - 1)); continue; } + if (Feature == "+direct") + continue; + if (Feature == "-direct") + continue; Diags.Report(diag::err_opt_not_valid_with_opt) << Feature << "-target-feature";