forked from ldc-developers/ldc
-
Notifications
You must be signed in to change notification settings - Fork 0
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 (l…
- Loading branch information
Showing
3 changed files
with
28 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"); | ||
} |