cmake env vars and cache entries: fix dictionary keys checks (#35)
This commit is contained in:
parent
6af670f976
commit
6a0af905db
|
@ -64,7 +64,7 @@ def _get_toolchain_variables(ctx, tools, flags):
|
||||||
|
|
||||||
for key in ctx.attr.env_vars:
|
for key in ctx.attr.env_vars:
|
||||||
existing = []
|
existing = []
|
||||||
if vars[key]:
|
if vars.get(key, None):
|
||||||
existing = vars[key]
|
existing = vars[key]
|
||||||
vars[key] = existing + [ctx.attr.env_vars[key]]
|
vars[key] = existing + [ctx.attr.env_vars[key]]
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ def _join_cache_options(ctx, toolchain_entries, user_entries):
|
||||||
|
|
||||||
for key in user_entries:
|
for key in user_entries:
|
||||||
existing = []
|
existing = []
|
||||||
if cache_entries[key]:
|
if cache_entries.get(key, None):
|
||||||
existing = cache_entries[key]
|
existing = cache_entries[key]
|
||||||
cache_entries[key] = existing + [user_entries[key]]
|
cache_entries[key] = existing + [user_entries[key]]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue