2020-09-23 15:06:36 -05:00
|
|
|
#
|
2021-11-04 05:28:42 -05:00
|
|
|
# post:common-dependencies-post.py
|
2020-09-23 15:06:36 -05:00
|
|
|
# Convenience script to add build flags for Marlin Enabled Features
|
|
|
|
#
|
2021-11-04 05:28:42 -05:00
|
|
|
import pioutil
|
|
|
|
if pioutil.is_pio_build():
|
2022-08-19 11:00:52 -05:00
|
|
|
Import("env", "projenv")
|
2020-09-23 15:06:36 -05:00
|
|
|
|
2022-08-19 11:00:52 -05:00
|
|
|
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())
|
2020-09-23 15:06:36 -05:00
|
|
|
|
2022-08-19 11:00:52 -05:00
|
|
|
# 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()
|