File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -944,6 +944,7 @@ class LLVM_LIBRARY_VISIBILITY EmscriptenTargetInfo
944
944
void getOSDefines (const LangOptions &Opts, const llvm::Triple &Triple,
945
945
MacroBuilder &Builder) const final {
946
946
WebAssemblyOSTargetInfo<Target>::getOSDefines (Opts, Triple, Builder);
947
+ DefineStd (Builder, " unix" , Opts);
947
948
Builder.defineMacro (" __EMSCRIPTEN__" );
948
949
if (Opts.POSIXThreads )
949
950
Builder.defineMacro (" __EMSCRIPTEN_PTHREADS__" );
Original file line number Diff line number Diff line change 1847
1847
// WEBASSEMBLY-NEXT:#define __clang_version__ "{{.*}}"
1848
1848
// WEBASSEMBLY-NEXT:#define __clang_wide_literal_encoding__ {{.*}}
1849
1849
// WEBASSEMBLY-NEXT:#define __llvm__ 1
1850
- // WEBASSEMBLY-NOT:#define __unix
1851
- // WEBASSEMBLY-NOT:#define __unix__
1850
+ // WEBASSEMBLY-WASI-NOT:#define __unix
1851
+ // WEBASSEMBLY-WASI-NOT:#define __unix__
1852
+ // EMSCRIPTEN-NEXT:#define __unix 1
1853
+ // EMSCRIPTEN-NEXT:#define __unix__ 1
1852
1854
// WEBASSEMBLY-WASI-NEXT:#define __wasi__ 1
1853
1855
// WEBASSEMBLY-NOT:#define __wasm_simd128__
1854
1856
// WEBASSEMBLY-NOT:#define __wasm_simd256__
1863
1865
// WEBASSEMBLY64-NEXT:#define __wasm64 1
1864
1866
// WEBASSEMBLY64-NEXT:#define __wasm64__ 1
1865
1867
// WEBASSEMBLY-NEXT:#define __wasm__ 1
1868
+ // EMSCRIPTEN:#define unix 1
1869
+ // WEBASSEMBLY-WASI-NOT:#define unix 1
1866
1870
// WEBASSEMBLY-CXX-NOT:_REENTRANT
1867
1871
// WEBASSEMBLY-CXX-NOT:__STDCPP_THREADS__
1868
1872
// WEBASSEMBLY-CXX-ATOMICS:#define _REENTRANT 1
You can’t perform that action at this time.
0 commit comments