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

Remove xcrunwrapper #235

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
1 change: 0 additions & 1 deletion crosstool/BUILD.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ cc_toolchain_suite(
":make_hashed_objlist.py",
":wrapped_clang",
":wrapped_clang_pp",
":xcrunwrapper.sh",
],
)
for arch in _APPLE_ARCHS
Expand Down
14 changes: 9 additions & 5 deletions crosstool/libtool.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# libtool.sh runs the command passed to it using "xcrunwrapper libtool".
#
# It creates symbolic links for all input files with a path-hash appended
# to their original name (foo.o becomes foo_{md5sum}.o). This is to circumvent
# a bug in the original libtool that arises when two input files have the same
Expand All @@ -33,8 +31,7 @@ if [ -z ${MY_LOCATION+x} ]; then
fi

function invoke_libtool() {
# Just invoke libtool via xcrunwrapper
"${MY_LOCATION}/xcrunwrapper.sh" libtool "$@" \
/usr/bin/xcrun libtool "$@" \
2> >(grep -v "the table of contents is empty (no object file members in the"`
`" library define global symbols)$" >&2)
# ^ Filtering a warning that's unlikely to indicate a real issue
Expand Down Expand Up @@ -137,5 +134,12 @@ for arg in "$@"; do
parse_option "$arg"
done

printf '%s\n' "${ARGS[@]}" > "$TEMPDIR/processed.params"
UPDATEDARGS=()
for ARG in "$@" ; do
ARG="${ARG//__BAZEL_XCODE_DEVELOPER_DIR__/${DEVELOPER_DIR}}"
ARG="${ARG//__BAZEL_XCODE_SDKROOT__/${SDKROOT}}"
UPDATEDARGS+=("${ARG}")
done

printf '%s\n' "${UPDATEDARGS[@]}" > "$TEMPDIR/processed.params"
invoke_libtool "@$TEMPDIR/processed.params"
2 changes: 0 additions & 2 deletions crosstool/osx_cc_configure.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ def configure_osx_toolchain(repository_ctx):
# for more info
xcode_locator = Label("@bazel_tools//tools/osx:xcode_locator.m")
osx_cc_wrapper = Label("@bazel_tools//tools/cpp:osx_cc_wrapper.sh.tpl")
xcrunwrapper = Label("@build_bazel_apple_support//crosstool:xcrunwrapper.sh")
libtool = Label("@build_bazel_apple_support//crosstool:libtool.sh")
make_hashed_objlist = Label("@build_bazel_apple_support//crosstool:make_hashed_objlist.py")
cc_toolchain_config = Label("@build_bazel_apple_support//crosstool:cc_toolchain_config.bzl")
Expand Down Expand Up @@ -160,7 +159,6 @@ def configure_osx_toolchain(repository_ctx):
"%{env}": "",
},
)
repository_ctx.symlink(xcrunwrapper, "xcrunwrapper.sh")
repository_ctx.symlink(libtool, "libtool")
repository_ctx.symlink(make_hashed_objlist, "make_hashed_objlist.py")
repository_ctx.symlink(cc_toolchain_config, "cc_toolchain_config.bzl")
Expand Down
44 changes: 0 additions & 44 deletions crosstool/xcrunwrapper.sh

This file was deleted.

5 changes: 0 additions & 5 deletions test/starlark_apple_binary.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,6 @@ starlark_apple_binary = rule(
name = "xcode_config_label",
),
),
"_xcrunwrapper": attr.label(
cfg = "exec",
default = Label("@bazel_tools//tools/objc:xcrunwrapper"),
executable = True,
),
"binary_type": attr.string(default = "executable"),
"bundle_loader": attr.label(),
"deps": attr.label_list(
Expand Down
5 changes: 0 additions & 5 deletions test/starlark_apple_static_library.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@ starlark_apple_static_library = rule(
name = "xcode_config_label",
),
),
"_xcrunwrapper": attr.label(
executable = True,
cfg = "exec",
default = Label("@bazel_tools//tools/objc:xcrunwrapper"),
),
"additional_linker_inputs": attr.label_list(
allow_files = True,
),
Expand Down