HomePhabricator

[WebAssembly] Make thread-related options consistent

Description

[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

Details

Committed
aheejinFeb 11 2019, 2:47 PM
Differential Revision
D57874: [WebAssembly] Make thread-related options consistent
Parents
rL353760: [NFC][clangd] Remove unused lambda capture
Branches
Unknown
Tags
Unknown