Include pins.h in dependencies script (#19468)

This commit is contained in:
Victor Oliveira
2020-09-23 17:06:36 -03:00
committed by GitHub
parent 362145f608
commit 90bc1993b6
169 changed files with 213 additions and 181 deletions

View File

@ -0,0 +1,16 @@
#
# common-dependencies-post.py
# Convenience script to add build flags for Marlin Enabled Features
#
Import("env")
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()

View File

@ -149,3 +149,6 @@
#define HAS_MENU_UBL
#endif
#endif
// Include pins for the current board. Platform tests will be skipped. No HAL-defined pins.
#include "../../../../Marlin/src/pins/pins.h"

View File

@ -238,7 +238,7 @@ def load_marlin_features():
else:
cmd += ['-D' + s]
cmd += ['-w -dM -E -x c++ buildroot/share/PlatformIO/scripts/common-dependencies.h']
cmd += ['-D__MARLIN_PREBUILD__ -w -dM -E -x c++ buildroot/share/PlatformIO/scripts/common-dependencies.h']
cmd = ' '.join(cmd)
blab(cmd)
define_list = subprocess.check_output(cmd, shell=True).splitlines()