forked from OSchip/llvm-project
[clang][WebAssemmbly] Call TargetInfo::adjust in derived method.
The superclass method handles a bunch of useful things. For example it applies flags such as `-fnew-alignment` which doesn't work without this patch. Differential Revision: https://reviews.llvm.org/D118573
This commit is contained in:
parent
389f67b35b
commit
ecbcefd693
|
@ -255,6 +255,7 @@ ArrayRef<Builtin::Info> WebAssemblyTargetInfo::getTargetBuiltins() const {
|
||||||
|
|
||||||
void WebAssemblyTargetInfo::adjust(DiagnosticsEngine &Diags,
|
void WebAssemblyTargetInfo::adjust(DiagnosticsEngine &Diags,
|
||||||
LangOptions &Opts) {
|
LangOptions &Opts) {
|
||||||
|
TargetInfo::adjust(Diags, Opts);
|
||||||
// If the Atomics feature isn't available, turn off POSIXThreads and
|
// If the Atomics feature isn't available, turn off POSIXThreads and
|
||||||
// ThreadModel, so that we don't predefine _REENTRANT or __STDCPP_THREADS__.
|
// ThreadModel, so that we don't predefine _REENTRANT or __STDCPP_THREADS__.
|
||||||
if (!HasAtomics) {
|
if (!HasAtomics) {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
// RUN: %clang_cc1 -std=c++1z %s -verify -triple x86_64-linux-gnu -DALIGN=16
|
// RUN: %clang_cc1 -std=c++1z %s -verify -triple x86_64-linux-gnu -DALIGN=16
|
||||||
// RUN: %clang_cc1 -std=c++1z %s -verify -fnew-alignment=2 -DALIGN=2
|
// RUN: %clang_cc1 -std=c++1z %s -verify -fnew-alignment=2 -DALIGN=2
|
||||||
// RUN: %clang_cc1 -std=c++1z %s -verify -fnew-alignment=256 -DALIGN=256
|
// RUN: %clang_cc1 -std=c++1z %s -verify -fnew-alignment=256 -DALIGN=256
|
||||||
|
// RUN: %clang_cc1 -std=c++1z %s -verify -triple wasm32-unknown-unknown -fnew-alignment=256 -DALIGN=256
|
||||||
|
|
||||||
// expected-no-diagnostics
|
// expected-no-diagnostics
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue