-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Emscripten: Predefine versions as for a regular Linux musl platform (…
…#4750)
- Loading branch information
1 parent
f1ed8e5
commit f1171f0
Showing
3 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// REQUIRES: target_WebAssembly | ||
|
||
// RUN: %ldc -mtriple=wasm32-unknown-emscripten -c %s | ||
|
||
|
||
// test predefined versions: | ||
|
||
version (Emscripten) {} else static assert(0); | ||
version (linux) {} else static assert(0); | ||
version (Posix) {} else static assert(0); | ||
version (CRuntime_Musl) {} else static assert(0); | ||
version (CppRuntime_LLVM) {} else static assert(0); | ||
|
||
|
||
// verify that some druntime C bindings are importable: | ||
|
||
import core.stdc.stdio; | ||
|
||
extern(C) void _start() { | ||
puts("Hello world"); | ||
} |