Skip to content

Commit

Permalink
Use target_flag_value instead of target_triple.str (#2793)
Browse files Browse the repository at this point in the history
When users define a toolchain using a `.json` file the
`toolchain.target_triple` is not populated, so `target_triple.str` is
invalid. We use `target_flag_value` instead, which is equivalent to the
`target_json.path` in cases where it's available and to
`target_triple.str` otherwise.
  • Loading branch information
scentini authored Aug 14, 2024
1 parent 0e2409e commit 802274c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rust/private/rust_analyzer.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ def _create_single_crate(ctx, attrs, info):
crate["deps"] = [_crate_id(dep.crate) for dep in info.deps if _crate_id(dep.crate) != crate_id]
crate["aliases"] = {_crate_id(alias_target.crate): alias_name for alias_target, alias_name in info.aliases.items()}
crate["cfg"] = info.cfgs
crate["target"] = find_toolchain(ctx).target_triple.str
crate["target"] = find_toolchain(ctx).target_flag_value
if info.proc_macro_dylib_path != None:
crate["proc_macro_dylib_path"] = _EXEC_ROOT_TEMPLATE + info.proc_macro_dylib_path
return crate
Expand Down

0 comments on commit 802274c

Please sign in to comment.