mirror of
https://github.com/google/re2.git
synced 2025-10-15 03:48:25 +08:00
Use --enable_platform_specific_config
in .bazelrc
.
This magically applies the `linux`, `macos` or `windows` configuration depending on the OS. Apart from simplifying things for us, this should hopefully also unbreak the RE2 build that Bazel folks run in their CI. Fixes #428. Change-Id: I2f4192dd728661558a8c4c4c8dd68a720af3ff71 Reviewed-on: https://code-review.googlesource.com/c/re2/+/61370 Reviewed-by: Perry Lorier <perryl@google.com> Reviewed-by: Paul Wankadia <junyer@google.com>
This commit is contained in:
@@ -45,7 +45,7 @@ Known issues with regard to building the C++ extension:
|
||||
class BuildExt(setuptools.command.build_ext.build_ext):
|
||||
|
||||
def build_extension(self, ext):
|
||||
if 'RUNNER_OS' not in os.environ:
|
||||
if 'GITHUB_ACTIONS' not in os.environ:
|
||||
return super().build_extension(ext)
|
||||
|
||||
# For @pybind11_bazel's `python_configure()`.
|
||||
@@ -55,7 +55,6 @@ class BuildExt(setuptools.command.build_ext.build_ext):
|
||||
self.spawn(cmd)
|
||||
|
||||
cmd = ['bazel', 'build']
|
||||
cmd.append(f'--config={os.environ["RUNNER_OS"].lower()}')
|
||||
if 'BAZEL_CPU' in os.environ:
|
||||
cmd.append(f'--cpu={os.environ["BAZEL_CPU"].lower()}')
|
||||
cmd += ['--compilation_mode=opt', '--', ':all']
|
||||
|
Reference in New Issue
Block a user