summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2019-10-18 04:34:26 +0000
committerThomas Lively <tlively@google.com>2019-10-18 04:34:26 +0000
commit28b915f1c58b6d9f347e22e042dfb17f4474db41 (patch)
tree5a3ba2aaa52248eadc8361ef86d6685e965f27eb /test
parent8dd70959300cd08be029518be56bc64ccfe271df (diff)
downloadclang-28b915f1c58b6d9f347e22e042dfb17f4474db41.tar.gz
[WebAssembly] -pthread implies -target-feature +sign-ext
Summary: The sign extension proposal was motivated by a desire to not have separate sign-extending atomic operations, so it is meant to be enabled when threads are used. Reviewers: aheejin, dschuff Subscribers: sbc100, jgravelle-google, sunfish, jfb, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69075 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@375199 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Driver/wasm-toolchain.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/Driver/wasm-toolchain.c b/test/Driver/wasm-toolchain.c
index e222d618d2..db15ca671d 100644
--- a/test/Driver/wasm-toolchain.c
+++ b/test/Driver/wasm-toolchain.c
@@ -48,11 +48,11 @@
// Thread-related command line tests.
-// '-pthread' sets +atomics, +bulk-memory, +mutable-globals, and --shared-memory
+// '-pthread' sets +atomics, +bulk-memory, +mutable-globals, +sign-ext, and --shared-memory
// RUN: %clang -### -no-canonical-prefixes -target wasm32-unknown-unknown \
// RUN: --sysroot=/foo %s -fuse-ld=wasm-ld -pthread 2>&1 \
// RUN: | FileCheck -check-prefix=PTHREAD %s
-// PTHREAD: clang{{.*}}" "-cc1" {{.*}} "-target-feature" "+atomics" "-target-feature" "+bulk-memory" "-target-feature" "+mutable-globals"
+// PTHREAD: clang{{.*}}" "-cc1" {{.*}} "-target-feature" "+atomics" "-target-feature" "+bulk-memory" "-target-feature" "+mutable-globals" "-target-feature" "+sign-ext"
// PTHREAD: wasm-ld{{.*}}" "-lpthread" "--shared-memory"
// '-pthread' not allowed with '-mno-atomics'
@@ -73,6 +73,12 @@
// RUN: | FileCheck -check-prefix=PTHREAD_NO_MUT_GLOBALS %s
// PTHREAD_NO_MUT_GLOBALS: invalid argument '-pthread' not allowed with '-mno-mutable-globals'
+// '-pthread' not allowed with '-mno-sign-ext'
+// RUN: %clang -### -no-canonical-prefixes -target wasm32-unknown-unknown \
+// RUN: --sysroot=/foo %s -pthread -mno-sign-ext 2>&1 \
+// RUN: | FileCheck -check-prefix=PTHREAD_NO_SIGN_EXT %s
+// PTHREAD_NO_SIGN_EXT: invalid argument '-pthread' not allowed with '-mno-sign-ext'
+
// '-fwasm-exceptions' sets +exception-handling
// RUN: %clang -### -no-canonical-prefixes -target wasm32-unknown-unknown \
// RUN: --sysroot=/foo %s -fwasm-exceptions 2>&1 \