rename absolute_path to zig_path
this is not an absolute path.
This commit is contained in:
parent
0302fb630a
commit
08b02cb7d2
@ -17,6 +17,6 @@ exports_files([
|
|||||||
|
|
||||||
declare_cc_toolchains(
|
declare_cc_toolchains(
|
||||||
os = {os},
|
os = {os},
|
||||||
absolute_path = {absolute_path},
|
zig_sdk_path = {zig_sdk_path},
|
||||||
zig_include_root = {zig_include_root},
|
zig_include_root = {zig_include_root},
|
||||||
)
|
)
|
||||||
|
@ -213,7 +213,7 @@ def _zig_repository_impl(repository_ctx):
|
|||||||
Label(src),
|
Label(src),
|
||||||
executable = False,
|
executable = False,
|
||||||
substitutions = {
|
substitutions = {
|
||||||
"{absolute_path}": _quote("external/zig_sdk"),
|
"{zig_sdk_path}": _quote("external/zig_sdk"),
|
||||||
"{os}": _quote(os),
|
"{os}": _quote(os),
|
||||||
"{zig_include_root}": _quote(zig_include_root),
|
"{zig_include_root}": _quote(zig_include_root),
|
||||||
},
|
},
|
||||||
|
@ -11,14 +11,14 @@ DEFAULT_TOOL_PATHS = {
|
|||||||
"strip": "/usr/bin/false",
|
"strip": "/usr/bin/false",
|
||||||
}.items()
|
}.items()
|
||||||
|
|
||||||
def declare_cc_toolchains(os, absolute_path, zig_include_root):
|
def declare_cc_toolchains(os, zig_sdk_path, zig_include_root):
|
||||||
for target_config in target_structs():
|
for target_config in target_structs():
|
||||||
gotarget = target_config.gotarget
|
gotarget = target_config.gotarget
|
||||||
zigtarget = target_config.zigtarget
|
zigtarget = target_config.zigtarget
|
||||||
|
|
||||||
cxx_builtin_include_directories = []
|
cxx_builtin_include_directories = []
|
||||||
for d in getattr(target_config, "toplevel_include", []):
|
for d in getattr(target_config, "toplevel_include", []):
|
||||||
cxx_builtin_include_directories.append(absolute_path + "/" + d)
|
cxx_builtin_include_directories.append(zig_sdk_path + "/" + d)
|
||||||
|
|
||||||
absolute_tool_paths = {}
|
absolute_tool_paths = {}
|
||||||
for name, path in target_config.tool_paths.items() + DEFAULT_TOOL_PATHS:
|
for name, path in target_config.tool_paths.items() + DEFAULT_TOOL_PATHS:
|
||||||
@ -32,9 +32,9 @@ def declare_cc_toolchains(os, absolute_path, zig_include_root):
|
|||||||
dynamic_library_linkopts = target_config.dynamic_library_linkopts
|
dynamic_library_linkopts = target_config.dynamic_library_linkopts
|
||||||
copts = target_config.copts
|
copts = target_config.copts
|
||||||
for s in getattr(target_config, "linker_version_scripts", []):
|
for s in getattr(target_config, "linker_version_scripts", []):
|
||||||
linkopts = linkopts + ["-Wl,--version-script,%s/%s" % (absolute_path, s)]
|
linkopts = linkopts + ["-Wl,--version-script,%s/%s" % (zig_sdk_path, s)]
|
||||||
for incl in getattr(target_config, "compiler_extra_includes", []):
|
for incl in getattr(target_config, "compiler_extra_includes", []):
|
||||||
copts = copts + ["-include", absolute_path + "/" + incl]
|
copts = copts + ["-include", zig_sdk_path + "/" + incl]
|
||||||
|
|
||||||
zig_cc_toolchain_config(
|
zig_cc_toolchain_config(
|
||||||
name = zigtarget + "_cc_config",
|
name = zigtarget + "_cc_config",
|
||||||
|
Loading…
Reference in New Issue
Block a user