Skip to content

Commit

Permalink
[WebAssembly] Add an -mdirect flag for the direct wasm object feature.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Dan Gohman committed Dec 2, 2016
1 parent 1057307 commit 070f9f1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/clang/Driver/Options.td
Original file line number Diff line number Diff line change
Expand Up @@ -1613,6 +1613,8 @@ def ffixed_x18 : Flag<["-"], "ffixed-x18">, Group<m_aarch64_Features_Group>,

def msimd128 : Flag<["-"], "msimd128">, Group<m_wasm_Features_Group>;
def mno_simd128 : Flag<["-"], "mno-simd128">, Group<m_wasm_Features_Group>;
def mdirect : Flag<["-"], "mdirect">, Group<m_wasm_Features_Group>;
def mno_direct : Flag<["-"], "mno-direct">, Group<m_wasm_Features_Group>;

def mamdgpu_debugger_abi : Joined<["-"], "mamdgpu-debugger-abi=">,
Flags<[HelpHidden]>,
Expand Down
4 changes: 4 additions & 0 deletions lib/Basic/Targets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8019,6 +8019,10 @@ class WebAssemblyTargetInfo : public TargetInfo {
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";
Expand Down

0 comments on commit 070f9f1

Please sign in to comment.