mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-12-01 23:58:33 +00:00
959be66cc2
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
19 lines
636 B
Python
19 lines
636 B
Python
#
|
|
# post:common-dependencies-post.py
|
|
# Convenience script to add build flags for Marlin Enabled Features
|
|
#
|
|
import pioutil
|
|
if pioutil.is_pio_build():
|
|
env = pioutil.env
|
|
projenv = env
|
|
Import("projenv") # src_dir environment. Only for post: scripts!
|
|
|
|
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()
|