aboutsummaryrefslogtreecommitdiff
path: root/docs/platform_overrides.md
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--docs/platform_overrides.md20
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
3To specify platform-specific information in rockspecs, one should use the
4`platforms` field of top-level tables.
5
6In top-level tables, a field `platforms` is treated specially. If present,
7it may contain a table containing sub-tables representing different platforms.
8For example, `build.platforms.unix`, if present, as the name implies, would
9be a table containing specifics for building on Unix systems.
10
11The contents of platform tables override the contents of the top-level table
12where `platforms` is located. For example, in a Linux system, an entry
13`build.platforms.linux.foo` will override `build.foo`. Tables are
14scanned 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
17don't need to rewrite the entire `build` section in a platform table, only
18the fields should change.
19
20