diff options
| author | Heejin Ahn <aheejin@gmail.com> | 2019-02-11 22:47:50 +0000 |
|---|---|---|
| committer | Heejin Ahn <aheejin@gmail.com> | 2019-02-11 22:47:50 +0000 |
| commit | a9cda1ceeb19ccd00f6fab26209d8e07db44424b (patch) | |
| tree | 4a4f12681be86e74ddcef45e44317cb34b00f0c0 /lib/Driver/Driver.cpp | |
| parent | ef5bc382a1aec774a1ea5600ce19f0781758ef8e (diff) | |
| download | clang-a9cda1ceeb19ccd00f6fab26209d8e07db44424b.tar.gz | |
[WebAssembly] Make thread-related options consistent
Summary:
There have been three options related to threads and users had to set
all three of them separately to get the correct compilation results.
This makes sure the relationship between the options makes sense and
sets necessary options for users if only part of the necessary options
are specified. This does:
- Remove `-matomics`; this option alone does not enable anything, so
removed it to not confuse users.
- `-mthread-model posix` sets `-target-feature +atomics`
- `-pthread` sets both `-target-feature +atomics` and
`-mthread-model posix`
Also errors out when explicitly given options don't match, such as
`-pthread` is given with `-mthread-model single`.
Reviewers: dschuff, sbc100, tlively, sunfish
Subscribers: jgravelle-google, jfb, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D57874
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@353761 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Driver.cpp')
| -rw-r--r-- | lib/Driver/Driver.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp index eb03e6e87c..b405390d44 100644 --- a/lib/Driver/Driver.cpp +++ b/lib/Driver/Driver.cpp @@ -1528,7 +1528,7 @@ void Driver::PrintVersion(const Compilation &C, raw_ostream &OS) const { if (TC.isThreadModelSupported(A->getValue())) OS << "Thread model: " << A->getValue(); } else - OS << "Thread model: " << TC.getThreadModel(); + OS << "Thread model: " << TC.getThreadModel(C.getArgs()); OS << '\n'; // Print out the install directory. |
