Skip to content

Commit

Permalink
Merge pull request #576 from hofbi/fix-toolchain-serialization
Browse files Browse the repository at this point in the history
Support empty extra_flags_per_feature
  • Loading branch information
mergify[bot] authored Sep 4, 2024
2 parents 3a57bd5 + 1d0fa3f commit 8c9f6be
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 1 addition & 3 deletions toolchains/cc/cc.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ def _parse_cc_toolchain_info(content, filename):
"COVERAGE_COMPILE_FLAGS",
"COVERAGE_LINK_FLAGS",
"SUPPORTS_START_END_LIB",
"EXTRA_FLAGS_PER_FEATURE",
"IS_CLANG",
"CONLY_FLAGS",
])
Expand Down Expand Up @@ -119,7 +118,6 @@ def _parse_cc_toolchain_info(content, filename):
coverage_compile_flags = info["COVERAGE_COMPILE_FLAGS"],
coverage_link_flags = info["COVERAGE_LINK_FLAGS"],
supports_start_end_lib = info["SUPPORTS_START_END_LIB"] == ["True"],
extra_flags_per_feature = info["EXTRA_FLAGS_PER_FEATURE"],
is_clang = info["IS_CLANG"] == ["True"],
conly_flags = info["CONLY_FLAGS"],
)
Expand Down Expand Up @@ -221,7 +219,7 @@ def _nixpkgs_cc_toolchain_config_impl(repository_ctx):
"%{coverage_compile_flags}": get_starlark_list(info.coverage_compile_flags),
"%{coverage_link_flags}": get_starlark_list(info.coverage_link_flags),
"%{supports_start_end_lib}": repr(info.supports_start_end_lib),
"%{extra_flags_per_feature}": repr(info.extra_flags_per_feature),
"%{extra_flags_per_feature}": "{}",
"%{conly_flags}": get_starlark_list(info.conly_flags),
},
)
Expand Down
2 changes: 0 additions & 2 deletions toolchains/cc/cc.nix
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,6 @@ pkgs.runCommand "bazel-${cc.orignalName or cc.name}-toolchain"
if [[ -x ${cc}/bin/ld.gold ]]; then echo True; else echo False; fi
)
)
EXTRA_FLAGS_PER_FEATURE=()
IS_CLANG=(
${if cc.isClang then "True" else "False"}
)
Expand Down Expand Up @@ -333,7 +332,6 @@ pkgs.runCommand "bazel-${cc.orignalName or cc.name}-toolchain"
write_info COVERAGE_COMPILE_FLAGS
write_info COVERAGE_LINK_FLAGS
write_info SUPPORTS_START_END_LIB
write_info EXTRA_FLAGS_PER_FEATURE
write_info IS_CLANG
write_info CONLY_FLAGS
''

0 comments on commit 8c9f6be

Please sign in to comment.