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
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,
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");
}
}
// 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'
// 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 \
// 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 \