Skip to content

Wrong link flags when compiling with Bazel and clang-cl #10007

Closed
@oakad

Description

When compiling with clang-cl toolchain (@bazel_tools//tools/cpp:clang-cl), wrong link flags will be set.

clang-cl is an important toolchain in particular for deep nested schemas, because it does not suffer from MAX_PATH limitations the normal cl toolchain has.

LINK_OPTS = select({
"//build_defs:config_android": [],
"//build_defs:config_android-stlport": [],
"//build_defs:config_android-libcpp": [],
"//build_defs:config_android-gnu-libstdcpp": [],
"//build_defs:config_android-default": [],
"//build_defs:config_msvc": [
# Suppress linker warnings about files with no symbols defined.
"-ignore:4221",
],
"//conditions:default": [
"-lpthread",
"-lm",
],
})

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions