Skip to content

Commit

Permalink
Revert "Copy module file instead of symlinking."
Browse files Browse the repository at this point in the history
This reverts commit 578ce77.

Copying doesn't appear to help with
bazelbuild/bazel#20886,
and it's going to be fixed in Bazel 7.1 anyway.
  • Loading branch information
phst committed Mar 5, 2024
1 parent 804af37 commit e8ff5db
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 57 deletions.
13 changes: 0 additions & 13 deletions elisp/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -534,19 +534,6 @@ elisp_binary(
],
)

py_binary(
name = "copy_file",
srcs = ["copy_file.py"],
python_version = "PY3",
srcs_version = "PY3",
visibility = [
# FIXME: Make private once
# https://github.com/bazelbuild/proposals/blob/main/designs/2019-10-15-tool-visibility.md
# is implemented in all supported Bazel versions.
"//visibility:public",
],
)

cc_defaults(
name = "launcher_defaults",
copts = LAUNCHER_COPTS,
Expand Down
32 changes: 0 additions & 32 deletions elisp/copy_file.py

This file was deleted.

16 changes: 4 additions & 12 deletions elisp/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -445,13 +445,10 @@ def _elisp_cc_module_impl(ctx):
lib = out.library_to_link.dynamic_library
else:
lib = ctx.actions.declare_file(filename)
ctx.actions.run(
executable = ctx.executable._copy_file,
arguments = [ctx.actions.args().add("--").add(out.library_to_link.dynamic_library).add(lib)],
inputs = [out.library_to_link.dynamic_library],
outputs = [lib],
mnemonic = "Copy",
progress_message = "Copying %{input} to %{output}",
ctx.actions.symlink(
output = lib,
target_file = out.library_to_link.dynamic_library,
progress_message = "Creating symbolic link " + lib.short_path,
)

# Replicate some implementation details of cc_binary to make coverage work,
Expand Down Expand Up @@ -567,11 +564,6 @@ C/C++ compiler. See the [corresponding attribute for
default = Label("//elisp:module_config"),
providers = [CcDefaultInfo, ModuleConfigInfo],
),
"_copy_file": attr.label(
default = Label("//elisp:copy_file"),
executable = True,
cfg = "exec",
),
},
provides = [EmacsLispInfo],
fragments = ["cpp"],
Expand Down

0 comments on commit e8ff5db

Please sign in to comment.