Skip to content

Commit a0064d3

Browse files
authored
fix handling of cc fragments
1 parent bfb1730 commit a0064d3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

builder/frameworks/espidf.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -424,8 +424,8 @@ def _extract_flags(config):
424424
for cg in config["compileGroups"]:
425425
flags[cg["language"]] = []
426426
for ccfragment in cg["compileCommandFragments"]:
427-
fragment = ccfragment.get("fragment", "")
428-
if not fragment.strip() or fragment.startswith("-D"):
427+
fragment = ccfragment.get("fragment", "").strip("\" ")
428+
if not fragment or fragment.startswith("-D"):
429429
continue
430430
flags[cg["language"]].extend(
431431
click.parser.split_arg_string(fragment.strip())
@@ -710,7 +710,7 @@ def prepare_build_envs(config, default_env, debug_allowed=True):
710710
build_env = default_env.Clone()
711711
build_env.SetOption("implicit_cache", 1)
712712
for cc in compile_commands:
713-
build_flags = cc.get("fragment")
713+
build_flags = cc.get("fragment", "").strip("\" ")
714714
if not build_flags.startswith("-D"):
715715
if build_flags.startswith("-include") and ".." in build_flags:
716716
source_index = cg.get("sourceIndexes")[0]

0 commit comments

Comments
 (0)