@@ -48,53 +48,89 @@ Declares a toolchain repository to generate.
4848
4949Declares a package repository explicitly. This is used when the package is not
5050taken from the default version matrix or when local QNX SDP generation is
51- required.
51+ required. The tag is nothing more than a thin proxy to the native ` http_archive `
52+ repository rule: its attributes are passed straight through to ` http_archive `
53+ with no additional processing.
5254
5355## ` gcc.toolchain(...) ` Attributes
5456
5557Required attributes:
5658
57- - ` name ` : name of the generated repository
58- - ` target_cpu ` : target CPU, currently ` x86_64 ` or ` aarch64 `
59- - ` target_os ` : target OS, currently ` linux ` or ` qnx `
59+ - ` name ` (mandatory): toolchain repo name, default set to ` score_gcc_toolchain ` .
60+ - ` target_cpu ` (mandatory) : target platform CPU, currently ` x86_64 ` or ` aarch64 ` .
61+ - ` target_os ` (mandatory) : target platform OS, currently ` linux ` or ` qnx ` .
6062
6163Common package selection attributes:
6264
63- - ` use_default_package ` : resolve package metadata from ` packages/version_matrix.bzl `
65+ - ` use_default_package ` : whether to use the default package from the version
66+ matrix, default set to ` False ` .
6467- ` version ` : GCC version string for Linux toolchains (e.g. ` 12.2.0 ` or ` 15.3.0 ` —
65- see ` packages/version_matrix.bzl ` for all versions currently packaged)
66- - ` sdp_version ` : QNX SDP version string
67- - ` sdk_version ` : alternative SDK identifier used in matrix resolution
68- - ` sdp_to_link ` : override the package repository name that the toolchain uses
68+ see ` packages/version_matrix.bzl ` for all versions currently packaged).
69+ - ` sdp_version ` : version of the SDP package.
70+ - ` sdk_version ` : SDK version info variable, an alternative identifier used in
71+ matrix resolution.
72+ - ` sdp_to_link ` : name of the toolchain package to be linked with this
73+ toolchain, default set to toolchain name + ` _pkg ` .
74+ - ` use_system_toolchain ` : TBD.
6975
7076Flag and runtime attributes:
7177
72- - ` extra_compile_flags `
73- - ` extra_c_compile_flags `
74- - ` extra_cxx_compile_flags `
75- - ` extra_link_flags `
76- - ` extra_known_features `
77- - ` extra_enabled_features `
78- - ` ld_library_paths `
79- - ` runtime_ecosystem `
80- - ` use_base_constraints_only `
78+ - ` extra_compile_flags ` : list of additional flags to be passed to compiler.
79+ - ` extra_c_compile_flags ` : list of additional flags to be passed to C compiler.
80+ - ` extra_cxx_compile_flags ` : list of additional flags to be passed to C++
81+ compiler.
82+ - ` extra_link_flags ` : list of additional flags to be passed to linker.
83+ - ` extra_known_features ` : extra ` cc_feature ` features to add to this toolchain
84+ in an initially disabled state. See [ Feature Injection] ( #feature-injection ) .
85+ - ` extra_enabled_features ` : extra ` cc_feature ` features to add to this
86+ toolchain in an initially enabled state. See [ Feature Injection] ( #feature-injection ) .
87+ - ` ld_library_paths ` : list of paths relative to the sysroot which should build
88+ up the runtime linker path of the tools of this toolchain.
89+ - ` runtime_ecosystem ` : attribute for identifying the system-level runtime
90+ environment a binary or target is built to run in.
91+ - ` use_base_constraints_only ` : experimental. Attribute for flag toolchain
92+ creation to use only base platform constraints. Limits toolchain
93+ registration to 1 per base platform definition.
8194
8295QNX-specific attributes:
8396
84- - ` license_path `
85- - ` license_info_variable `
86- - ` license_info_url `
97+ - ` license_path ` : path to the shared license file, default set to
98+ ` /opt/score_qnx/license/licenses ` .
99+ - ` license_info_variable ` : QNX license info variable.
100+ - ` license_info_url ` : URL of the QNX license server.
87101
88102## ` gcc.sdp(...) ` Attributes
89103
90- The ` gcc.sdp ` tag defines the package side of the toolchain setup. Important
91- attributes are:
92-
93- - ` name ` : repository name for the package
94- - ` build_file ` : BUILD file that exposes the package contents as Bazel targets
95- - ` url ` : url of the archive,
96- - ` sha256 ` : sha256 of the archive
97- - ` strip_prefix ` : extraction prefix for packaged archives
104+ The ` gcc.sdp ` tag defines the package side of the toolchain setup. It is a
105+ proxy to ` http_archive ` : every attribute below maps 1:1 to the identically
106+ named ` http_archive ` attribute, so refer to the Bazel ` http_archive ` docs for
107+ full semantics. Its attributes are:
108+
109+ - ` name ` : package name of toolchain, default set to toolchain name + ` _pkg ` .
110+ - ` build_file ` : the path to the BUILD file of selected archive.
111+ - ` url ` : url to the toolchain archive.
112+ - ` sha256 ` : checksum of the archive.
113+ - ` strip_prefix ` : strip prefix from toolchain archive.
114+ - ` files ` : a map of relative paths (key) to a file label (value) that is
115+ overlaid on the repo as a symlink.
116+ - ` patches ` : list of patches to apply to the archive.
117+ - ` patch_args ` : the arguments given to the patch tool. Defaults to ` -p0 ` (see
118+ the ` patch_strip ` attribute), however ` -p1 ` will usually be needed for
119+ patches generated by git. When arguments other than ` -p ` are specified,
120+ Bazel falls back to the ` patch ` command line tool instead of the
121+ Bazel-native patch implementation. Only affects patch files in the
122+ ` patches ` attribute.
123+ - ` patch_cmds ` : bash commands executed in the extracted archive root after
124+ extraction.
125+ - ` patch_strip ` : when set to ` N ` , this is equivalent to inserting ` -pN ` to the
126+ beginning of ` patch_args ` .
127+ - ` patch_tool ` : the patch(1) utility to use. If specified, Bazel uses the
128+ specified patch tool instead of the Bazel-native patch implementation.
129+
130+ These ` patch_* ` /` files ` attributes are only wired for archives declared
131+ directly with ` gcc.sdp(...) ` . Default packages resolved from
132+ ` packages/version_matrix.bzl ` fall back to their attribute defaults (empty
133+ list/string, ` 0 ` ) since the version matrix does not carry these fields.
98134
99135## Feature Injection
100136
0 commit comments