Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 334ed6d

Browse files
authored
Describe how platforms are identified in tooling
This patch adds a document which describes the definition of the build triples we use to name builds of binary components for different processor, platform and build option combinations.
1 parent a4b681a commit 334ed6d

File tree

1 file changed

+131
-0
lines changed

1 file changed

+131
-0
lines changed

docs/development/platform-id.md

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
# Platform Identification Triples
2+
3+
LiveCode is built for and supports multiple different platforms with a variety of
4+
architecture and toolchain/sdk versions. In order to identify specific builds
5+
uniquely a standard triple format is used:
6+
```
7+
<architecture>-<platform>[-<options>]
8+
```
9+
For example, the triple describing 32-bit linux would be x86-linux; and the
10+
triple describing 64-bit macOS built against the 10.9 SDK would be
11+
x86_64-mac-macos10.9
12+
13+
*Note:* All triples should be written, generated and manipulated as lowercase as
14+
they will be used as parts of names of files and folders on disk on platforms
15+
with case-sensitive filenames.
16+
17+
The specific architectures, platforms and options that are supported are
18+
outlined in this document.
19+
20+
## Architectures
21+
22+
A universal set of names for architectures are used, however only a subset are
23+
valid for any specific platform/options combination and for each platform there
24+
is a mapping to a specific ABI/processor configuration for it.
25+
26+
The following architecture identifiers are available:
27+
28+
- x86
29+
- x86_64
30+
- armv6
31+
- armv7
32+
- arm64
33+
- universal
34+
- js
35+
36+
The x86 architecture is currently supported for linux, mac, win32 and
37+
ios-iphonesimulator. It maps to the default 32-bit x86 ABI and processor
38+
configuration for the target.
39+
40+
The x86_64 architecture is currently supported for linux, mac and
41+
ios-iphonesimulator targets. It maps to the default 64-bit x86-64 ABI and
42+
processor configuration for the target.
43+
44+
The armv6 architecture is currently supported for android. It maps to
45+
the the (linux) armeabi ABI and processor configuration.
46+
47+
The armv7 architecture is currently supported for android and ios-iphoneos. It
48+
maps to the (linux) armeabi_v7a ABI and processor configuration on android, and
49+
to the armv7 ABI and processor configuration on ios-iphoneos.
50+
51+
The armv64 architecture is currently supported for ios-iphoneos. It maps to
52+
the arm64 ABI and processor configuration.
53+
54+
The universal architecture is currently supported for mac and ios. It describes
55+
'fat' builds containing multiple architecture slices. It maps as follows:
56+
57+
- mac: x86 and x86_64
58+
- ios-iphonesimulator: x86 and x86_64
59+
- ios-iphoneos: armv7 and arm64
60+
61+
The js architecture is only supported for emscripten.
62+
63+
## Platforms
64+
65+
The following platform identifiers are available:
66+
67+
- linux
68+
- mac
69+
- win32
70+
- android
71+
- ios
72+
- emscripten
73+
74+
## Options
75+
76+
For some platforms the architecture and platform pair is not enough to
77+
describe the specific target a native code component has been built for.
78+
In this case a third options section will be present. The options available are
79+
specific to a particular platform.
80+
81+
### Windows (win32)
82+
83+
Components built using different versions of msvc or different crt modes are
84+
incompatible and thus must be explictly expressed.
85+
86+
The options section has the form:
87+
```
88+
msvc<X>_<Y>
89+
```
90+
Where X is the 100 * the compiler version, and Y is the CRT mode which is one of:
91+
92+
- mtd: built against the static debug CRT
93+
- mt: built against the static release CRT
94+
- mdd: built against the dynamic debug CRT
95+
- md: built against the dynamic release CRT
96+
97+
For example, a build using the X86 VC2015 compiler for static release CRT would be
98+
`x86-win32-msvc140_mt`.
99+
100+
### Mac (mac)
101+
102+
Components built using different SDK versions are incompatible and thus must
103+
be explicitly expressed.
104+
105+
The options section is the lowercase version of the SDK identifier used to build
106+
the component:
107+
```
108+
macosx<N>.<M> (for SDK versions < 10.12)
109+
macos<N>.<M> (for SDK versions >= 10.12)
110+
```
111+
Where N is the major version of the SDK and M is the minor version of the SDK.
112+
113+
For example, a build using the x86 compiler in the 10.9 SDK would be
114+
`x86-mac-macosx10.9`.
115+
116+
### iOS (ios)
117+
118+
Components built using different iOS SDKs are incompatible and thus must be
119+
explicitly expressed. Indeed, the difference between the iOS simulator builds
120+
and iOS device builds are expressed in terms of the SDK.
121+
122+
The options section is the lowercase version of the SDK identifier used to
123+
build the component:
124+
```
125+
iphonesimulator<N>.<M>
126+
iphoneos<N>.<M>
127+
```
128+
Where N is the major version of the SDK and M is the minor version of the SDK.
129+
130+
For example, a universal build for the iOS simulator against the 8.3 SDK would
131+
be `universal-ios-iphonesimulator8.3`.

0 commit comments

Comments
 (0)