diff options
Diffstat (limited to '')
-rw-r--r-- | docs/platform_overrides.md | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/docs/platform_overrides.md b/docs/platform_overrides.md new file mode 100644 index 00000000..ddda180f --- /dev/null +++ b/docs/platform_overrides.md | |||
@@ -0,0 +1,20 @@ | |||
1 | # Platform overrides | ||
2 | |||
3 | To specify platform-specific information in rockspecs, one should use the | ||
4 | `platforms` field of top-level tables. | ||
5 | |||
6 | In top-level tables, a field `platforms` is treated specially. If present, | ||
7 | it may contain a table containing sub-tables representing different platforms. | ||
8 | For example, `build.platforms.unix`, if present, as the name implies, would | ||
9 | be a table containing specifics for building on Unix systems. | ||
10 | |||
11 | The contents of platform tables override the contents of the top-level table | ||
12 | where `platforms` is located. For example, in a Linux system, an entry | ||
13 | `build.platforms.linux.foo` will override `build.foo`. Tables are | ||
14 | scanned deeply, so if `build.foo` is a table, the contents of | ||
15 | `build.platforms.linux.foo` will add to or replace the contents of | ||
16 | `build.foo`, instead of just replacing the entire table. Therefore, you | ||
17 | don't need to rewrite the entire `build` section in a platform table, only | ||
18 | the fields should change. | ||
19 | |||
20 | |||