Commit 04af270f by Derek Mauro Committed by Copybara-Service

Add empty WORKSPACE.bzlmod

When bzlmod is enabled and WORKSPACE.bzlmod exists, the content of
WORKSPACE is ignored. This prevents bzlmod builds from unintentionally
depending on the WORKSPACE file.

This exposed some small problems with our clang-cl configuration,
which are also fixed in this change.

PiperOrigin-RevId: 602511311
Change-Id: I0ba411edde2df0e17f4eeede4117ddb6934dd8f8
parent d5eb5032
#
# Copyright 2020 The Abseil Authors. # Copyright 2020 The Abseil Authors.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
...@@ -23,3 +22,14 @@ exports_files([ ...@@ -23,3 +22,14 @@ exports_files([
"AUTHORS", "AUTHORS",
"LICENSE", "LICENSE",
]) ])
# For building with clang-cl.
# https://bazel.build/configure/windows#clang
platform(
name = "x64_windows-clang-cl",
constraint_values = [
"@platforms//cpu:x86_64",
"@platforms//os:windows",
"@bazel_tools//tools/cpp:clang-cl",
],
)
...@@ -20,6 +20,9 @@ module( ...@@ -20,6 +20,9 @@ module(
compatibility_level = 1, compatibility_level = 1,
) )
cc_configure = use_extension("@bazel_tools//tools/cpp:cc_configure.bzl", "cc_configure_extension")
use_repo(cc_configure, "local_config_cc")
# Only direct dependencies need to be listed below. # Only direct dependencies need to be listed below.
# Please keep the versions in sync with the versions in the WORKSPACE file. # Please keep the versions in sync with the versions in the WORKSPACE file.
......
# Copyright 2024 The Abseil Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# https://bazel.build/external/migration#workspace.bzlmod
#
# This file is intentionally empty. When bzlmod is enabled and this
# file exists, the contents of WORKSPACE is ignored. This prevents
# bzlmod builds from unintentionally depending on the WORKSPACE file.
...@@ -68,17 +68,6 @@ config_setting( ...@@ -68,17 +68,6 @@ config_setting(
visibility = [":__subpackages__"], visibility = [":__subpackages__"],
) )
# x64_windows-clang-cl - used for selecting clang-cl for CI builds
platform(
name = "x64_windows-clang-cl",
constraint_values = [
"@platforms//cpu:x86_64",
"@platforms//os:windows",
"@bazel_tools//tools/cpp:clang-cl",
],
visibility = [":__subpackages__"],
)
config_setting( config_setting(
name = "osx", name = "osx",
constraint_values = [ constraint_values = [
......
...@@ -49,7 +49,7 @@ IF NOT "%ALTERNATE_OPTIONS%"=="" copy %ALTERNATE_OPTIONS% absl\base\options.h ...@@ -49,7 +49,7 @@ IF NOT "%ALTERNATE_OPTIONS%"=="" copy %ALTERNATE_OPTIONS% absl\base\options.h
--define=absl=1 ^ --define=absl=1 ^
--distdir=%KOKORO_GFILE_DIR%\distdir ^ --distdir=%KOKORO_GFILE_DIR%\distdir ^
--enable_bzlmod=true ^ --enable_bzlmod=true ^
--extra_execution_platforms=//absl:x64_windows-clang-cl ^ --extra_execution_platforms=//:x64_windows-clang-cl ^
--extra_toolchains=@local_config_cc//:cc-toolchain-x64_windows-clang-cl ^ --extra_toolchains=@local_config_cc//:cc-toolchain-x64_windows-clang-cl ^
--keep_going ^ --keep_going ^
--test_env="GTEST_INSTALL_FAILURE_SIGNAL_HANDLER=1" ^ --test_env="GTEST_INSTALL_FAILURE_SIGNAL_HANDLER=1" ^
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment