Skip to content

Commit 7cf7a68

Browse files
committed
Fix bug in bazel BUILD file: clang-cl takes MSVC-style flags, rather than clang-style flags.
1 parent 533a45c commit 7cf7a68

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

BUILD

+4
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ NSYNC_OPTS = select({
138138
# Select the compiler include directory.
139139
":gcc": ["-I" + pkg_path_name() + "/platform/gcc"],
140140
":clang": ["-I" + pkg_path_name() + "/platform/clang"],
141+
":clang-cl": ["-I" + pkg_path_name() + "/platform/clang"],
141142
":msvc-cl": ["-I" + pkg_path_name() + "/platform/msvc"],
142143
"//conditions:default": ["-I" + pkg_path_name() + "/platform/gcc"],
143144
}) + select({
@@ -152,6 +153,7 @@ NSYNC_OPTS = select({
152153
# Options for C++11 build, rather then C build.
153154
NSYNC_OPTS_CPP = select({
154155
":msvc-cl": ["/TP"],
156+
":clang-cl": ["/TP"],
155157
"//conditions:default": [
156158
"-x",
157159
"c++",
@@ -198,12 +200,14 @@ NSYNC_OPTS_CPP = select({
198200
# Link options (for tests) built in C (rather than C++11).
199201
NSYNC_LINK_OPTS = select({
200202
":msvc-cl": [],
203+
":clang-cl": [],
201204
"//conditions:default": ["-pthread"],
202205
})
203206

204207
# Link options (for tests) built in C++11 (rather than C).
205208
NSYNC_LINK_OPTS_CPP = select({
206209
":msvc-cl": [],
210+
":clang-cl": [],
207211
"//conditions:default": ["-pthread"],
208212
})
209213

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.29.1
1+
1.29.2

bazel/bazel_BUILD

+4
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ NSYNC_OPTS = select({
138138
# Select the compiler include directory.
139139
":gcc": ["-I" + pkg_path_name() + "/platform/gcc"],
140140
":clang": ["-I" + pkg_path_name() + "/platform/clang"],
141+
":clang-cl": ["-I" + pkg_path_name() + "/platform/clang"],
141142
":msvc-cl": ["-I" + pkg_path_name() + "/platform/msvc"],
142143
"//conditions:default": ["-I" + pkg_path_name() + "/platform/gcc"],
143144
}) + select({
@@ -152,6 +153,7 @@ NSYNC_OPTS = select({
152153
# Options for C++11 build, rather then C build.
153154
NSYNC_OPTS_CPP = select({
154155
":msvc-cl": ["/TP"],
156+
":clang-cl": ["/TP"],
155157
"//conditions:default": [
156158
"-x",
157159
"c++",
@@ -198,12 +200,14 @@ NSYNC_OPTS_CPP = select({
198200
# Link options (for tests) built in C (rather than C++11).
199201
NSYNC_LINK_OPTS = select({
200202
":msvc-cl": [],
203+
":clang-cl": [],
201204
"//conditions:default": ["-pthread"],
202205
})
203206

204207
# Link options (for tests) built in C++11 (rather than C).
205208
NSYNC_LINK_OPTS_CPP = select({
206209
":msvc-cl": [],
210+
":clang-cl": [],
207211
"//conditions:default": ["-pthread"],
208212
})
209213

0 commit comments

Comments
 (0)