diff options
author | Thomas Lively <tlively@google.com> | 2019-03-02 00:18:09 +0000 |
---|---|---|
committer | Thomas Lively <tlively@google.com> | 2019-03-02 00:18:09 +0000 |
commit | 53ab562266c8359aa7e6aefa994443059366bd85 (patch) | |
tree | a349decde36f9929e365f344e23514a54357fa56 | |
parent | 8302be4db4e454f45deae6fa8a470db7bc3495d0 (diff) | |
download | clang-53ab562266c8359aa7e6aefa994443059366bd85.tar.gz |
[WebAssembly] Temporarily disable bulk-memory with -pthread
Summary:
To prevent the instability of bulk-memory in the wasm backend from
blocking separate pthread testing, temporarily remove the logic that
adds -mbulk-memory in the presence of -pthread. Since browsers will
ship bulk memory before or alongside threads, this change will be
reverted as soon as bulk memory has stabilized in the backend.
Reviewers: sbc100
Subscribers: dschuff, jgravelle-google, aheejin, sunfish, jfb, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D58854
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@355248 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Driver/ToolChains/WebAssembly.cpp | 22 | ||||
-rw-r--r-- | test/Driver/wasm-toolchain.c | 12 | ||||
-rw-r--r-- | test/Preprocessor/wasm-target-features.c | 6 |
3 files changed, 5 insertions, 35 deletions
diff --git a/lib/Driver/ToolChains/WebAssembly.cpp b/lib/Driver/ToolChains/WebAssembly.cpp index ce28d447ff..0104cbbbf4 100644 --- a/lib/Driver/ToolChains/WebAssembly.cpp +++ b/lib/Driver/ToolChains/WebAssembly.cpp @@ -124,8 +124,7 @@ void WebAssembly::addClangTargetOptions(const ArgList &DriverArgs, options::OPT_fno_use_init_array, true)) CC1Args.push_back("-fuse-init-array"); - // '-pthread' implies '-target-feature +atomics' and - // '-target-feature +bulk-memory' + // '-pthread' implies '-target-feature +atomics' if (DriverArgs.hasFlag(options::OPT_pthread, options::OPT_no_pthread, false)) { if (DriverArgs.hasFlag(options::OPT_mno_atomics, options::OPT_matomics, @@ -133,27 +132,8 @@ void WebAssembly::addClangTargetOptions(const ArgList &DriverArgs, getDriver().Diag(diag::err_drv_argument_not_allowed_with) << "-pthread" << "-mno-atomics"; - if (DriverArgs.hasFlag(options::OPT_mno_bulk_memory, - options::OPT_mbulk_memory, false)) - getDriver().Diag(diag::err_drv_argument_not_allowed_with) - << "-pthread" - << "-mno-bulk-memory"; CC1Args.push_back("-target-feature"); CC1Args.push_back("+atomics"); - CC1Args.push_back("-target-feature"); - CC1Args.push_back("+bulk-memory"); - } - - // '-matomics' implies '-mbulk-memory' - if (DriverArgs.hasFlag(options::OPT_matomics, options::OPT_mno_atomics, - false)) { - if (DriverArgs.hasFlag(options::OPT_mno_bulk_memory, - options::OPT_mbulk_memory, false)) - getDriver().Diag(diag::err_drv_argument_not_allowed_with) - << "-matomics" - << "-mno-bulk-memory"; - CC1Args.push_back("-target-feature"); - CC1Args.push_back("+bulk-memory"); } } diff --git a/test/Driver/wasm-toolchain.c b/test/Driver/wasm-toolchain.c index bdef316c85..9c217ef2e9 100644 --- a/test/Driver/wasm-toolchain.c +++ b/test/Driver/wasm-toolchain.c @@ -41,18 +41,10 @@ // Thread-related command line tests. -// '-pthread' sets '-target-feature +atomics' and '-target-feature +bulk-memory' +// '-pthread' sets '-target-feature +atomics' // RUN: %clang -### -no-canonical-prefixes -target wasm32-unknown-unknown --sysroot=/foo %s -pthread 2>&1 | FileCheck -check-prefix=PTHREAD %s -// PTHREAD: clang{{.*}}" "-cc1" {{.*}} "-target-feature" "+atomics" "-target-feature" "+bulk-memory" +// PTHREAD: clang{{.*}}" "-cc1" {{.*}} "-target-feature" "+atomics" // '-pthread' not allowed with '-mno-atomics' // RUN: %clang -### -no-canonical-prefixes -target wasm32-unknown-unknown --sysroot=/foo %s -pthread -mno-atomics 2>&1 | FileCheck -check-prefix=PTHREAD_NO_ATOMICS %s // PTHREAD_NO_ATOMICS: invalid argument '-pthread' not allowed with '-mno-atomics' - -// '-pthread' not allowed with '-mno-bulk-memory' -// RUN: %clang -### -no-canonical-prefixes -target wasm32-unknown-unknown --sysroot=/foo %s -pthread -mno-bulk-memory 2>&1 | FileCheck -check-prefix=PTHREAD_NO_BULKMEM %s -// PTHREAD_NO_BULKMEM: invalid argument '-pthread' not allowed with '-mno-bulk-memory' - -// '-matomics' not allowed with '-mno-bulk-memory' -// RUN: %clang -### -no-canonical-prefixes -target wasm32-unknown-unknown --sysroot=/foo %s -matomics -mno-bulk-memory 2>&1 | FileCheck -check-prefix=ATOMICS_NO_BULKMEM %s -// ATOMICS_NO_BULKMEM: invalid argument '-matomics' not allowed with '-mno-bulk-memory' diff --git a/test/Preprocessor/wasm-target-features.c b/test/Preprocessor/wasm-target-features.c index 80e299247c..d32c1b00be 100644 --- a/test/Preprocessor/wasm-target-features.c +++ b/test/Preprocessor/wasm-target-features.c @@ -59,8 +59,7 @@ // RUN: -target wasm64-unknown-unknown -matomics \ // RUN: | FileCheck %s -check-prefix=ATOMICS // -// ATOMICS-DAG:#define __wasm_atomics__ 1{{$}} -// ATOMICS-DAG:#define __wasm_bulk_memory__ 1{{$}} +// ATOMICS:#define __wasm_atomics__ 1{{$}} // RUN: %clang -E -dM %s -o - 2>&1 \ // RUN: -target wasm32-unknown-unknown -pthread \ @@ -69,8 +68,7 @@ // RUN: -target wasm64-unknown-unknown -pthread \ // RUN: | FileCheck %s -check-prefix=PTHREAD // -// PTHREAD-DAG:#define __wasm_atomics__ 1{{$}} -// PTHREAD-DAG:#define __wasm_bulk_memory__ 1{{$}} +// PTHREAD:#define __wasm_atomics__ 1{{$}} // RUN: %clang -E -dM %s -o - 2>&1 \ // RUN: -target wasm32-unknown-unknown -mcpu=mvp \ |