Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rm crosstool #3986

Merged
merged 3 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
context: s/crosstool/cc_toolchain_files/
  • Loading branch information
sluongng authored and fmeum committed Aug 2, 2024
commit 15fd9e6d086513e8c4a106ce1fe05cf750226474
2 changes: 1 addition & 1 deletion go/private/actions/compilepkg.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def emit_compilepkg(
execution_requirements = SUPPORTS_PATH_MAPPING_REQUIREMENT
if cgo:
inputs.extend(cgo_inputs.to_list()) # OPT: don't expand depset
inputs.extend(go.crosstool)
inputs.extend(go.cc_toolchain_files)
env["CC"] = go.cgo_tools.c_compiler_path
if cppopts:
args.add("-cppflags", quote_opts(cppopts))
Expand Down
2 changes: 1 addition & 1 deletion go/private/actions/link.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def emit_link(
inputs_transitive = [
archive.libs,
archive.cgo_deps,
as_set(go.crosstool),
as_set(go.cc_toolchain_files),
as_set(go.sdk.tools),
as_set(go.stdlib.libs),
]
Expand Down
4 changes: 2 additions & 2 deletions go/private/actions/stdlib.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def _build_stdlib_list_json(go):

inputs = go.sdk_files
if not go.mode.pure:
inputs += go.crosstool
inputs += go.cc_toolchain_files

go.actions.run(
inputs = inputs,
Expand Down Expand Up @@ -144,7 +144,7 @@ def _build_stdlib(go):
go.sdk.headers +
go.sdk.tools +
[go.sdk.go, go.sdk.package_list, go.sdk.root_file] +
go.crosstool)
go.cc_toolchain_files)

if go.mode.pgoprofile:
args.add("-pgoprofile", go.mode.pgoprofile)
Expand Down
8 changes: 4 additions & 4 deletions go/private/context.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -523,11 +523,11 @@ def go_context(ctx, attr = None):
env["GOARM"] = mode.arm

if not cgo_context_info:
crosstool = []
cc_toolchain_files = []
cgo_tools = None
else:
env.update(cgo_context_info.env)
crosstool = cgo_context_info.crosstool
cc_toolchain_files = cgo_context_info.cc_toolchain_files

# Add C toolchain directories to PATH.
# On ARM, go tool link uses some features of gcc to complete its work,
Expand Down Expand Up @@ -584,7 +584,7 @@ def go_context(ctx, attr = None):
actions = ctx.actions,
exe_extension = goos_to_extension(mode.goos),
shared_extension = goos_to_shared_extension(mode.goos),
crosstool = crosstool,
cc_toolchain_files = cc_toolchain_files,
package_list = toolchain.sdk.package_list,
importpath = importpath,
importmap = importmap,
Expand Down Expand Up @@ -846,7 +846,7 @@ def _cgo_context_data_impl(ctx):
)

return [CgoContextInfo(
crosstool = cc_toolchain.all_files.to_list(),
cc_toolchain_files = cc_toolchain.all_files.to_list(),
tags = tags,
env = env,
cgo_tools = struct(
Expand Down
2 changes: 1 addition & 1 deletion go/toolchains.rst
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ Fields
| The suffix to use for shared libraries in this build mode. Mostly used when |
| generating output filenames of binary rules. |
+--------------------------------+-----------------------------------------------------------------+
| :param:`crosstool` | :type:`list of File` |
| :param:`cc_toolchain_files` | :type:`list of File` |
fmeum marked this conversation as resolved.
Show resolved Hide resolved
+--------------------------------+-----------------------------------------------------------------+
| The files you need to add to the inputs of an action in order to use the cc toolchain. |
+--------------------------------+-----------------------------------------------------------------+
Expand Down