| OLD | NEW |
| 1 <font color='red'>This page is deprecated. Its contents have been moved to <a h
ref='http://sites.google.com/a/chromium.org/dev/nativeclient/native-client-docum
entation-index/build-tcb'>http://sites.google.com/a/chromium.org/dev/nativeclien
t/native-client-documentation-index/build-tcb</a></font> | 1 **This page is deprecated. Its contents have been [moved](https://www.chromium.
org/nativeclient/how-tos/build-tcb).** |
| 2 | 2 |
| 3 ## What build system(s) is Native Client using? | 3 ## What build system(s) is Native Client using? |
| 4 | 4 |
| 5 The primary build system used by Native Client is [Scons] | 5 The primary build system used by Native Client is [Scons] |
| 6 (http://www.scons.org/). For historical reasons we are not using plain SCons but | 6 (http://www.scons.org/). For historical reasons we are not using plain SCons but |
| 7 an extension call Hammer. | 7 an extension call Hammer. |
| 8 | 8 |
| 9 The parts of the system shared with Chrome are also built using Chrome's build | 9 The parts of the system shared with Chrome are also built using Chrome's build |
| 10 system, Gyp. | 10 system, gn. |
| 11 | 11 |
| 12 We also have some Makefiles and some shell scripts for certain build tasks. | 12 We also have some Makefiles and some shell scripts for certain build tasks. |
| 13 | 13 |
| 14 ## Why is this such a complex mess? | 14 ## Why is this such a complex mess? |
| 15 | 15 |
| 16 The usual excuses: | 16 The usual excuses: |
| 17 | 17 |
| 18 * Inherent complexity. | 18 * Inherent complexity. |
| 19 * Historical reasons. | 19 * Historical reasons. |
| 20 * Entropy requires no maintenance. | 20 * Entropy requires no maintenance. |
| 21 * ... | 21 * ... |
| 22 | 22 |
| 23 ## Which files contain build system information? | 23 ## Which files contain build system information? |
| 24 | 24 |
| 25 For SCons it is: SConstruct, `**/build.scons`, `**/nacl.scons` There are also | 25 For SCons it is: SConstruct, `**/build.scons`, `**/nacl.scons` There are also |
| 26 relevant configuration files in `site_scons/site_tools/*`, and random Python | 26 relevant configuration files in `site_scons/site_tools/*`, and random Python |
| 27 scripts located here and there. | 27 scripts located here and there. |
| 28 | 28 |
| 29 For Gyp it is: `**/*.gyp` and `**/*.gypi` | 29 For gn it is: `**/*.gn` and `**/*.gni` |
| 30 | 30 |
| 31 ## What is the difference between trusted and untrusted code? | 31 ## What is the difference between trusted and untrusted code? |
| 32 | 32 |
| 33 "trusted code" encompasses components like: * the browser plugin * service | 33 "trusted code" encompasses components like: |
| 34 runtime (sel\_ldr) It is compiled using regular compilers. Bugs in trusted code | 34 * the browser plugin |
| 35 can compromise system security, hence the name. As far as the build system is | 35 * service runtime (`sel_ldr`) |
| 36 concerned trusted code is described in `**/build.scons` files. The Gyp system | |
| 37 only code trusted code. "trusted code" lives in `src/trusted/**` | |
| 38 | 36 |
| 39 "untrusted code" encompasses components like: * quake and other examples of | 37 It is compiled using regular compilers. Bugs in trusted code can compromise |
| 40 Native Client executables * libraries necessary to build quake It is compiled | 38 system security, hence the name. As far as the build system is concerned |
| 41 using special sandboxing compilers. As far as the build system is concerned | 39 trusted code is described in `**/build.scons` files. The gn system only code |
| 42 trusted code is described in `**/nacl.scons` files. "untrusted code" lives in | 40 trusted code. "trusted code" lives in `src/trusted/**` |
| 43 `src/untrusted/**` and also in `tests/**` | 41 |
| 42 "untrusted code" encompasses components like: |
| 43 * quake and other examples of Native Client executables |
| 44 * libraries necessary to build quake |
| 45 |
| 46 It is compiled using special sandboxing compilers. As far as the build system is |
| 47 concerned trusted code is described in `**/nacl.scons` files. "untrusted code" |
| 48 lives in `src/untrusted/**` and also in `tests/**` |
| 44 | 49 |
| 45 Some code can be compiled either as trusted or shared code, e.g. libraries that | 50 Some code can be compiled either as trusted or shared code, e.g. libraries that |
| 46 facilitate communication between trusted and untrusted code. Such code typically | 51 facilitate communication between trusted and untrusted code. Such code typically |
| 47 lives in `src/shared/**` and has both build.scons and nacl.scons files. | 52 lives in `src/shared/**` and has both build.scons and nacl.scons files. |
| 48 | 53 |
| 49 ## How do you use the MODE= setting when invoking SCons? | 54 ## How do you use the MODE= setting when invoking SCons? |
| 50 | 55 |
| 51 The MODE= setting or its equivalent --mode is used to select whether you want to | 56 The MODE= setting or its equivalent --mode is used to select whether you want to |
| 52 compile trusted or untrusted code or both and how. Examples: | 57 compile trusted or untrusted code or both and how. Examples: |
| 53 | 58 |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 In particular it is NOT possible to use different SUBARCHs for BUILD and TARGET. | 144 In particular it is NOT possible to use different SUBARCHs for BUILD and TARGET. |
| 140 | 145 |
| 141 ## What is the relationship between TARGET\_PLATFORM and untrusted code? | 146 ## What is the relationship between TARGET\_PLATFORM and untrusted code? |
| 142 | 147 |
| 143 The flavor of the untrusted code is derived from the TARGET\_PLATFORM | 148 The flavor of the untrusted code is derived from the TARGET\_PLATFORM |
| 144 | 149 |
| 145 ## Why are BUILD_and ARCH_ used inconsistently? | 150 ## Why are BUILD_and ARCH_ used inconsistently? |
| 146 | 151 |
| 147 Usually BUILD\_ARCH == TARGET\_ARCH and BUILD\_SUBARCH == TARGET\_SUBARCH so | 152 Usually BUILD\_ARCH == TARGET\_ARCH and BUILD\_SUBARCH == TARGET\_SUBARCH so |
| 148 mistakes have no consequences. | 153 mistakes have no consequences. |
| OLD | NEW |