Skip to content

Commit

Permalink
Revert "macos: rollback linkopt flag (#5684)"
Browse files Browse the repository at this point in the history
This reverts commit 8bfb1c6.
  • Loading branch information
sluongng committed Jan 12, 2024
1 parent bef35cb commit 56da2f8
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 32 deletions.
10 changes: 8 additions & 2 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,6 @@ common --nolegacy_important_outputs

# Use a static PATH variable to prevent unnecessary rebuilds of dependencies like protobuf.
common --incompatible_strict_action_env
common:macos --action_env=DEVELOPER_DIR
common:macos --host_action_env=DEVELOPER_DIR

# rules_nodejs needs runfiles to be explicitly enabled.
common:linux --enable_runfiles
Expand Down Expand Up @@ -199,6 +197,14 @@ common:macos --cxxopt=-std=c++17
common:windows --host_cxxopt=/std:c++17
common:windows --cxxopt=/std:c++17

# Starting from Xcode 15, the linker will warn about duplicate flags.
# This is currently not avoidable with the current way the local cc toolchain is configured
# as well as how linkopts are propagated through the dependency graph between libraries.
# This flag is a workaround to silence the linker warnings.
# common:macos --linkopt="-Wl,-no_warn_duplicate_libraries"
# common:macos --host_linkopt="-Wl,-no_warn_duplicate_libraries"
common:macos --platform_mappings=platform_mapping

# Ensure that we don't use the apple_support cc_toolchain
common:macos --repo_env=BAZEL_NO_APPLE_CPP_TOOLCHAIN=1

Expand Down
36 changes: 6 additions & 30 deletions .github/workflows/build-mac-intel-github-release-artifacts.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,9 @@
name: "Build Mac-Intel Github Release Artifacts"

on:
workflow_dispatch:
inputs:
release_branch:
description: "Git branch to checkout."
required: true
default: "master"
type: string
version_tag:
description: "Version to tag release artifacts."
required: true
type: string
workflow_call:
inputs:
release_branch:
description: "Git branch to checkout."
required: true
type: string
version_tag:
description: "Version to tag release artifacts."
required: true
type: string
pull_request:
branches:
- master

jobs:
build:
Expand All @@ -31,9 +13,6 @@ jobs:
uses: actions/checkout@v3
with:
ref: ${{ inputs.release_branch }}
# We need to fetch git tags to obtain the latest version tag to report
# the version of the running binary.
fetch-depth: 0

- name: Install bazelisk
run: |
Expand All @@ -45,10 +24,7 @@ jobs:
- name: Build and Upload Artifacts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEVELOPER_DIR: "/Library/Developer/CommandLineTools"
run: |
export DEVELOPER_DIR=/Library/Developer/CommandLineTools
"${GITHUB_WORKSPACE}/bin/bazel" build --config=release-mac --remote_header=x-buildbuddy-api-key=${{ secrets.BUILDBUDDY_ORG_API_KEY }} //server/cmd/buildbuddy:buildbuddy //enterprise/server/cmd/server:buildbuddy //enterprise/server/cmd/executor:executor
cp bazel-bin/server/cmd/**/**/buildbuddy buildbuddy-darwin-amd64
cp bazel-bin/enterprise/server/cmd/**/**/buildbuddy buildbuddy-enterprise-darwin-amd64
cp bazel-bin/enterprise/server/cmd/**/**/executor executor-enterprise-darwin-amd64
gh release upload ${{ inputs.version_tag }} buildbuddy-darwin-amd64 buildbuddy-enterprise-darwin-amd64 executor-enterprise-darwin-amd64 --clobber
env
"${GITHUB_WORKSPACE}/bin/bazel" build --toolchain_resolution_debug='@bazel_tools//tools/cpp:toolchain_type' --config=release-mac --remote_header=x-buildbuddy-api-key=${{ secrets.BUILDBUDDY_ORG_API_KEY }} //server/cmd/buildbuddy:buildbuddy //enterprise/server/cmd/server:buildbuddy //enterprise/server/cmd/executor:executor
5 changes: 5 additions & 0 deletions platform_mapping
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
platforms:
@local_config_platform//:host
--action_env=DEVELOPER_DIR=/Library/Developer/CommandLineTools
--host_action_env=DEVELOPER_DIR=/Library/Developer/CommandLineTools
--host_linkopt="-Wl,-v"

0 comments on commit 56da2f8

Please sign in to comment.