-
Notifications
You must be signed in to change notification settings - Fork 1
/
Environment detection.txt
79 lines (69 loc) · 4.87 KB
/
Environment detection.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
Cross-compilation
=================
Ambrosia supports cross-compilation "natively", which means it was inherently baked into
the program and not an afterthought. There are three terms that are important in cross-
compilation: host, target and build:
Host: the platform/OS where the created binary will run/be used.
Target: Only important when compiling compilers; the host the created binary will create binaries for. Confused?
Build: the platform/OS where Ambrosia is run. This is the easiest to determine (it's compiled in)
Target is not implemented for now (not really a reason to do so). The host option can be altered (see next section).
SUPPORT
-------
This table lists the target OS - toolchain combinations that Ambrosia can build with/for.
The left column is the option provided by the "-cross=..." option on the commandline.
Ambrosia cross | target OS | bitness | Toolchain | Preferred | Description
--------------------+-----------+---------+-------------+-----------+-------------
windows-x86-gcc | Windows | 32 | GNU | no | MinGW (all 32-bit flavours)
windows-amd64-gcc | Windows | 64 | GNU | no | MinGW (all 64-bit flavours)
windows-x86-msvc | Windows | 32 | Microsoft | yes | Windows SDK and/or Visual Studio tools x86
windows-amd64-msvc | Windows | 64 | Microsoft | yes | Windows SDK and/or Visual Studio tools x64
windows-x86-clang | Windows | 32 | LLVM | no | 32-bit Clang on Windows
windows-amd64-clang | Windows | 64 | LLVM | no | 64-bit Clang on Windows
windows-x86-icc | Windows | 32 | Intel | no | Intel Compiler for 32-bit Windows
windows-amd64-icc | Windows | 64 | Intel | no | Intel Compiler for 64-bit Windows
linux-x86-gcc | linux | 32 | GNU | yes | x86 GCC on linux
linux-amd64-gcc | linux | 64 | GNU | yes | amd64 GCC on linux
linux-x86-clang | linux | 32 | LLVM | no | Clang on x86 Linux
linux-amd64-clang | linux | 64 | LLVM | no | Clang on amd64 linux
linux-x86-icc | linux | 32 | Intel | no | Intel Compiler on x86 linux
linux-amd64-icc | linux | 64 | Intel | no | Intel Compiler on x86_64 linux
mac-x86-gcc | Mac OS X | 32 | GNU | no | Apple GCC on 32-bit Mac OS X
mac-amd64-gcc | Mac OS X | 64 | GNU | no | Apple GCC on 64-bit Mac OS X
mac-x86-clang | Mac OS X | 32 | LLVM | yes | Apple Clang for x86 Mac OS X
mac-amd64-clang | Mac OS X | 64 | LLVM | yes | Apple Clang for x86_64 Mac OS X
mac-x86-icc | Mac OS X | 32 | Intel | no | Intel Compiler for x86 Mac OS X
mac-amd64-icc | Mac OS X | 64 | Intel | no | Intel Compiler for x86_64 Mac OS X
If no "-cross=..." option is passed, auto-detection is initiated:
0. Environment variables CC, CXX, LD, etc. are used.
1. Native compilation is assumed, which means running Ambrosia
on Windows x64 will by default create Win64 binaries if possible.
2. Preferred toolchains if not specified (see above).
A "-toolchain=..." option will allow to choose a specific one if more of
them are in PATH.
This information is unique to a run of Ambrosia, and can only be altered
by the "-cross=..." or "-toolchain=..." options. Many platform specific
settings (like inclusion of source files or not in a certain target) can be
determined this way by using following builtin conditionals:
Note: most of these config strings can be set on a per-target basis
config string | set if
--------------+---------
build_windows | Ambrosia was built for and is used on Windows
build_linux | Ambrosia was built for and is used on Linux
build_mac | Ambrosia was built for and is used on Mac OS X
windows | Ambrosia is targetting (building for) Windows
linux | Ambrosia is targetting (building for) Linux
mac | Ambrosia is targetting (building for) Mac OS X
x86 | Ambrosia is targetting (building for) 32-bit x86
amd64 | Ambrosia is targetting (building for) 64-bit amd64/x86_64
build_x86 | Ambrosia is used on 32-bit x86
build_amd64 | Ambrosia is used on 64_bit amd64/x86_64
| (also true for 32-bit app on 64-bit OS)
gcc | GCC is used
msvc | Microsoft's cl.exe is used
icc | Intels compiler is used
clang | LLVM's Clang is used
debug | debug build (no optimizations + debug information)
release | release build (optimizations and no debug information)
release_debug | Release build with debug info
static | Link statically where possible
shared | Link dynamically where possible, produce shared libraries