From c6211b47b0d0a89eea082affd1496af00ac5d758 Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Tue, 20 Dec 2022 15:22:29 +0100 Subject: [PATCH] [SCons] Platform agnostic default toolchain (GNU). Create the SCons Environment with an empty PLATFORM variable to force the default tools to use the GNU toolchain. Platform specific toolchains are then setup in our custom tools. --- SConstruct | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SConstruct b/SConstruct index 09a963f9b7..e25dd955e0 100644 --- a/SConstruct +++ b/SConstruct @@ -28,7 +28,9 @@ elif ARGUMENTS.get("platform", ""): else: raise ValueError("Could not detect platform automatically, please specify with platform=") -env = Environment(tools=["default"]) +# Default tools with no platform defaults to gnu toolchain. +# We apply platform specific toolchains via our custom tools. +env = Environment(tools=["default"], PLATFORM="") # Default num_jobs to local cpu count if not user specified. # SCons has a peculiarity where user-specified options won't be overridden