-
-
Notifications
You must be signed in to change notification settings - Fork 863
Scope build_src_flags to project source compilation only
#5407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -176,7 +176,9 @@ def ProcessProjectDeps(env): | |||||||||||||||||
| env.Exit(1) | ||||||||||||||||||
|
|
||||||||||||||||||
| if "test" not in env["BUILD_TYPE"] or env.GetProjectOption("test_build_src"): | ||||||||||||||||||
| plb.env.BuildSources( | ||||||||||||||||||
| src_env = plb.env.Clone() | ||||||||||||||||||
| src_env.ProcessFlags(src_env.get("BUILD_SRC_FLAGS")) | ||||||||||||||||||
|
Comment on lines
+179
to
+180
|
||||||||||||||||||
| src_env = plb.env.Clone() | |
| src_env.ProcessFlags(src_env.get("BUILD_SRC_FLAGS")) | |
| # Use a dedicated environment for project sources to avoid | |
| # re-processing source build flags that may already be applied in plb.env | |
| src_env = env.Clone() | |
| build_src_flags = plb.env.get("BUILD_SRC_FLAGS") or env.get("BUILD_SRC_FLAGS") | |
| if build_src_flags: | |
| src_env.ProcessFlags(build_src_flags) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
build_src_flagsis stored in the build env asSRC_BUILD_FLAGS(seeplatformio/project/options.py), but this code readsBUILD_SRC_FLAGS, so the option won’t be applied to project sources (and builds that rely on-D…inbuild_src_flagswill break). UseSRC_BUILD_FLAGShere.