2021-03-06 09:50:26 +00:00
|
|
|
#
|
2021-11-04 10:28:42 +00:00
|
|
|
# post:common-dependencies-post.py
|
2021-03-06 09:50:26 +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():
|
2024-06-14 21:01:34 +00:00
|
|
|
env = pioutil.env
|
|
|
|
projenv = env
|
|
|
|
Import("projenv") # src_dir environment. Only for post: scripts!
|
2021-04-17 19:19:33 +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())
|
2021-03-06 09:50:26 +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()
|