Make sure flag_group.flags is non-empty

This commit is contained in:
Alexander Grund 2020-10-12 12:33:32 +02:00
parent b6bc26301d
commit b24a50b67d
No known key found for this signature in database
GPG Key ID: E92C451FC21EF13F

View File

@ -497,12 +497,11 @@ def _features(cpu, compiler, ctx):
),
flag_set(
actions = all_link_actions(),
flag_groups = [
flag_group(flags = (
["-Wl,-no-as-needed"] if cpu == "local" else []
) + (
["-B" + ctx.attr.linker_bin_path] if ctx.attr.linker_bin_path else []
),
flag_groups = ([
flag_group(flags = ["-Wl,-no-as-needed"])
] if cpu == "local" else []) + ([
flag_group(flags = ["-B" + ctx.attr.linker_bin_path])
] if ctx.attr.linker_bin_path" else []) + [
flag_group(
flags = ["@%{linker_param_file}"],
expand_if_available = "linker_param_file",