aboutsummaryrefslogtreecommitdiff
path: root/buildroot/share/PlatformIO/scripts/common-dependencies-post.py
diff options
context:
space:
mode:
Diffstat (limited to 'buildroot/share/PlatformIO/scripts/common-dependencies-post.py')
-rw-r--r--buildroot/share/PlatformIO/scripts/common-dependencies-post.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/buildroot/share/PlatformIO/scripts/common-dependencies-post.py b/buildroot/share/PlatformIO/scripts/common-dependencies-post.py
new file mode 100644
index 0000000..2b1b948
--- /dev/null
+++ b/buildroot/share/PlatformIO/scripts/common-dependencies-post.py
@@ -0,0 +1,16 @@
+#
+# common-dependencies-post.py
+# Convenience script to add build flags for Marlin Enabled Features
+#
+
+Import("env")
+Import("projenv")
+
+def apply_board_build_flags():
+ if not 'BOARD_CUSTOM_BUILD_FLAGS' in env['MARLIN_FEATURES']:
+ return
+ projenv.Append(CCFLAGS=env['MARLIN_FEATURES']['BOARD_CUSTOM_BUILD_FLAGS'].split())
+
+# We need to add the board build flags in a post script
+# so the platform build script doesn't overwrite the custom CCFLAGS
+apply_board_build_flags()