Try building the testing for RE2 with CMake again.

Benchmark on Ubuntu seems problematic with LTO, so... disable LTO.

GoogleTest on Windows makes MSVC's linker give "already defined in
testing.lib(exhaustive_tester.obj)" errors, so... frob the testing
library in the faint hope that the issue will finally be resolved.

Change-Id: Ib4237d44a12aa5bd2783d6b1285a5ccb14df4665
Reviewed-on: https://code-review.googlesource.com/c/re2/+/61330
Reviewed-by: Perry Lorier <perryl@google.com>
Reviewed-by: Paul Wankadia <junyer@google.com>
This commit is contained in:
Paul Wankadia
2023-05-19 08:43:08 +00:00
parent 07bd28d922
commit 6dbafa438b
5 changed files with 18 additions and 15 deletions

View File

@@ -54,11 +54,11 @@ class BuildExt(setuptools.command.build_ext.build_ext):
cmd = ['bazel', 'clean', '--expunge']
self.spawn(cmd)
cmd = ['bazel', 'build', '--compilation_mode=opt']
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 += ['--', ':all']
cmd += ['--compilation_mode=opt', '--', ':all']
self.spawn(cmd)
# This ensures that f'_re2.{importlib.machinery.EXTENSION_SUFFIXES[0]}'