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