Skip to content

osx support #5154

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

Merged
merged 4 commits into from
Nov 21, 2023
Merged
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
11 changes: 9 additions & 2 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ build:remote --remote_timeout=7200
# ========================================

# Enable libc++ and C++20 by default.
build --config=libc++20
build:linux --config=libc++20
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why disable on macos? we have c++20 code already I think.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang: error: invalid linker name in argument '-fuse-ld=lld'

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should use clang's lld on macos? what linker are you using?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the default one setting xcode.

I won't encourage anyone use proxy on macos for production, all these lines make that easier to develop on macos.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no problems with allowing macos development. Just want to make sure we're not breaking release on linux.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do my best to make it won't happen, and there's a long time before next release, so I think it's pretty safe.


# Need for CI image to pickup docker-credential-gcloud, PATH is fixed in rbe-toolchain-* configs.
build:remote-ci --action_env=PATH=/usr/local/google-cloud-sdk/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/llvm/bin
Expand All @@ -25,7 +25,8 @@ build --define path_normalization_by_default=true

# Heap profiler is supported only with gperf tcmalloc, not google tcmalloc.
# See: https://github.com/istio/istio/issues/28233
build --define tcmalloc=gperftools
build:linux --define tcmalloc=gperftools
build:macos --define tcmalloc=disabled
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same - why disable gperftools?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

always fails with following error:

configure: error: in `/private/var/tmp/_bazel_zirain/351f889f26744009d08525dc5ecb1daa/sandbox/darwin-sandbox/371/execroot/io_istio_proxy/bazel-out/darwin_arm64-fastbuild/bin/external/envoy/bazel/foreign_cc/gperftools_build.build_tmpdir':
configure: error: C compiler cannot create executables

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, it's fine but you won't get heap profile and some tools. what does tcmalloc disabled mean? what malloc is it using?

Copy link
Member Author

@zirain zirain Nov 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

envoy has same line, this's a known limitation. https://github.com/envoyproxy/envoy/blob/05457bb047b87f4cc1a25635400ddcaa7fccc923/.bazelrc#L138

I won't encourage anyone use proxy on macos for production, all these line make that easier to develop on macos.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't recall, does linux configuration automatically kick-in?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if not, there must be huge problem.


# Build with embedded V8-based WebAssembly runtime.
build --define wasm=v8
Expand Down Expand Up @@ -67,3 +68,9 @@ build:clang-asan-ci --linkopt=-l:libclang_rt.ubsan_standalone_cxx.a
build:clang-tsan-ci --config=clang-tsan
build:clang-tsan-ci --linkopt=-L/opt/libcxx_tsan/lib
build:clang-tsan-ci --linkopt=-Wl,-rpath,/opt/libcxx_tsan/lib

# get from https://github.com/Homebrew/homebrew-core/blob/master/Formula/e/envoy.rb
build:macos --cxxopt=-Wno-range-loop-analysis
build:macos --host_cxxopt=-Wno-range-loop-analysis
build:macos --cxxopt=-Wno-deprecated-declarations
build:macos --host_cxxopt=-Wno-deprecated-declarations