contrib/own_zig.md: clarify zig-bootstrap instructions
This commit is contained in:
parent
64b6c702db
commit
c023c217a5
@ -11,7 +11,7 @@ Assume you want to test an unreleased version of zig. Here's how:
|
|||||||
2. Copy over zig/ from ~/zig:
|
2. Copy over zig/ from ~/zig:
|
||||||
|
|
||||||
$ rm -fr 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`):
|
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:
|
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.
|
- Point toolchain/defs.bzl to the new version.
|
||||||
- Run tests.
|
- Run tests.
|
||||||
|
|
||||||
|
@ -19,9 +19,9 @@ def declare_cc_toolchains(os, absolute_path, zig_include_root):
|
|||||||
cxx_builtin_include_directories = []
|
cxx_builtin_include_directories = []
|
||||||
for d in DEFAULT_INCLUDE_DIRECTORIES + target_config.includes:
|
for d in DEFAULT_INCLUDE_DIRECTORIES + target_config.includes:
|
||||||
d = zig_include_root + d
|
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", []):
|
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 = {}
|
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:
|
||||||
@ -29,7 +29,7 @@ def declare_cc_toolchains(os, absolute_path, zig_include_root):
|
|||||||
absolute_tool_paths[name] = path
|
absolute_tool_paths[name] = path
|
||||||
continue
|
continue
|
||||||
tool_path = zig_tool_path(os).format(zig_tool = path)
|
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
|
linkopts = target_config.linkopts
|
||||||
dynamic_library_linkopts = target_config.dynamic_library_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", []):
|
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" % (absolute_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", 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