mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-25 12:57:53 +00:00
22 lines
613 B
Python
22 lines
613 B
Python
#
|
|
# common-dependencies-post.py
|
|
# Convenience script to add build flags for Marlin Enabled Features
|
|
#
|
|
Import("env")
|
|
|
|
# Detect that 'vscode init' is running
|
|
from SCons.Script import COMMAND_LINE_TARGETS
|
|
if "idedata" in COMMAND_LINE_TARGETS:
|
|
env.Exit(0)
|
|
|
|
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()
|