1

contrib/own_zig.md: clarify zig-bootstrap instructions

This commit is contained in:
Motiejus Jakštys 2022-09-22 11:39:39 +03:00
parent 64b6c702db
commit c023c217a5
2 changed files with 6 additions and 6 deletions

View File

@ -11,7 +11,7 @@ Assume you want to test an unreleased version of zig. Here's how:
2. Copy over zig/ from ~/zig:
$ rm -fr zig
$ tar -C ~/zig archive --format=tar --prefix=zig/ master | tar -xv
$ git -C ~/zig archive --format=tar --prefix=zig/ master | tar -xv
3. Build it (assuming `x86_64-linux`):
@ -24,7 +24,7 @@ Assume you want to test an unreleased version of zig. Here's how:
This gives us a usable Zig SDK. Now:
- Send the .tar.gz it to your mirror.
- Send the .tar.xz it to your mirror.
- Point toolchain/defs.bzl to the new version.
- Run tests.

View File

@ -19,9 +19,9 @@ def declare_cc_toolchains(os, absolute_path, zig_include_root):
cxx_builtin_include_directories = []
for d in DEFAULT_INCLUDE_DIRECTORIES + target_config.includes:
d = zig_include_root + d
cxx_builtin_include_directories.append(absolute_path + "/" + d)
cxx_builtin_include_directories.append(d)
for d in getattr(target_config, "toplevel_include", []):
cxx_builtin_include_directories.append(absolute_path + "/" + d)
cxx_builtin_include_directories.append(d)
absolute_tool_paths = {}
for name, path in target_config.tool_paths.items() + DEFAULT_TOOL_PATHS:
@ -29,7 +29,7 @@ def declare_cc_toolchains(os, absolute_path, zig_include_root):
absolute_tool_paths[name] = path
continue
tool_path = zig_tool_path(os).format(zig_tool = path)
absolute_tool_paths[name] = "%s/%s" % (absolute_path, tool_path)
absolute_tool_paths[name] = tool_path
linkopts = target_config.linkopts
dynamic_library_linkopts = target_config.dynamic_library_linkopts
@ -37,7 +37,7 @@ def declare_cc_toolchains(os, absolute_path, zig_include_root):
for s in getattr(target_config, "linker_version_scripts", []):
linkopts = linkopts + ["-Wl,--version-script,%s/%s" % (absolute_path, s)]
for incl in getattr(target_config, "compiler_extra_includes", []):
copts = copts + ["-include", absolute_path + "/" + incl]
copts = copts + ["-include", incl]
zig_cc_toolchain_config(
name = zigtarget + "_cc_config",