# Ignore third-party projects. These should be configured separately and some
# include Bazel configs.
libcxx/utils/google-benchmark
-third-party
+third-party/benchmark
":basic",
":frontend",
"//llvm:Support",
- "//llvm:gtest",
+ "//third-party/unittest:gtest",
],
)
"//llvm:Core",
"//llvm:Support",
"//llvm:TestingSupport",
- "//llvm:gmock",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gmock",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
"//clang:frontend",
"//clang:testing",
"//clang:tooling",
- "//llvm:gtest",
+ "//third-party/unittest:gtest",
],
)
"//clang:tooling",
"//llvm:Support",
"//llvm:TestingSupport",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
"//clang:frontend",
"//clang:tooling",
"//llvm:Support",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
"//clang:parse",
"//clang:tooling",
"//llvm:Support",
- "//llvm:gmock",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gmock",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
"//llvm:Support",
"//llvm:TestingADT",
"//llvm:TestingSupport",
- "//llvm:gmock",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gmock",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
"//llvm:Support",
"//llvm:TestingSupport",
"//llvm:config",
- "//llvm:gmock",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gmock",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
"//clang:sema",
"//llvm:Core",
"//llvm:Support",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
"//clang:frontend",
"//clang:tooling_core",
"//llvm:Support",
- "//llvm:gmock",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gmock",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
"//clang:sema",
"//clang:serialization",
"//llvm:Support",
- "//llvm:gmock",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gmock",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
"//clang:serialization",
"//llvm:Support",
"//llvm:TestingSupport",
- "//llvm:gmock",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gmock",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
"//clang:tooling",
"//clang:tooling_core",
"//llvm:Support",
- "//llvm:gtest",
+ "//third-party/unittest:gtest",
],
)
"//clang:tooling",
"//clang:tooling_refactoring",
"//llvm:Support",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
deps = [
"//clang:rewrite",
"//clang:tooling",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
"//clang:sema",
"//clang:tooling",
"//llvm:TestingSupport",
- "//llvm:gmock",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gmock",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
"//clang:static_analyzer_frontend",
"//clang:testing",
"//clang:tooling",
- "//llvm:gtest",
+ "//third-party/unittest:gtest",
],
)
"//clang:tooling",
"//llvm:Support",
"//llvm:config",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
"//clang:transformer",
"//llvm:Support",
"//llvm:TestingSupport",
- "//llvm:gmock",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gmock",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
"//clang:tooling",
"//clang:tooling_core",
"//llvm:Support",
- "//llvm:gtest",
+ "//third-party/unittest:gtest",
],
)
"//clang:tooling_syntax",
"//llvm:Support",
"//llvm:TestingSupport",
- "//llvm:gmock",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gmock",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
"//clang:tooling_syntax",
"//llvm:Support",
"//llvm:TestingSupport",
- "//llvm:gmock",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gmock",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
deps = [
"//clang:libclang",
"//llvm:Support",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
":BinaryFormat",
":CodeGen",
":DebugInfo",
- ":Debuginfod",
":DebugInfoDWARF",
+ ":Debuginfod",
":Demangle",
":MC",
":MCDisassembler",
],
)
-# A hacky library to expose some internal headers of gtest to its own
-# implementation source files using a stripped include prefix rather than
-# file-relative-inclusion.
-#
-# FIXME: This file should be in `textual_hdrs` instead of `hdrs`, but
-# unfortunately that doesn't work with `strip_include_prefix`:
-# https://github.com/bazelbuild/bazel/issues/12424
-#
-# For now, simply disable parsing and header modules.
-cc_library(
- name = "gtest_internal_headers",
- testonly = True,
- hdrs = ["utils/unittest/googletest/src/gtest-internal-inl.h"],
- features = [
- "-parse_headers",
- "-header_modules",
- ],
- strip_include_prefix = "utils/unittest/googletest",
-)
-
-cc_library(
- name = "gtest",
- testonly = True,
- srcs = glob(
- [
- "utils/unittest/googletest/include/**/*.h",
- "utils/unittest/googletest/src/*.cc",
- ],
- exclude = [
- "utils/unittest/googletest/src/gtest-all.cc",
- "utils/unittest/googletest/include/gtest/gtest_pred_impl.h",
- ],
- ) + [
- ],
- hdrs = ["utils/unittest/googletest/include/gtest/gtest.h"],
- copts = llvm_copts,
- defines = [
- "GTEST_HAS_RTTI=0",
- "__STDC_LIMIT_MACROS",
- "__STDC_CONSTANT_MACROS",
- ] + select({
- "@bazel_tools//src/conditions:windows": ["GTEST_USE_OWN_TR1_TUPLE=0"],
- "//conditions:default": ["GTEST_USE_OWN_TR1_TUPLE=1"],
- }),
- includes = [
- "include",
- "utils/unittest/googletest/include",
- ],
- textual_hdrs = [
- "utils/unittest/googletest/include/gtest/gtest_pred_impl.h",
- ],
- deps = [
- ":Support",
- ":gtest_internal_headers",
- ],
-)
-
-cc_library(
- name = "gtest_main",
- testonly = True,
- srcs = ["utils/unittest/UnitTestMain/TestMain.cpp"],
- copts = llvm_copts,
- deps = [
- ":Support",
- ":gmock",
- ":gtest",
- ],
-)
-
-cc_library(
- name = "gmock",
- testonly = True,
- srcs = glob(
- [
- "utils/unittest/googlemock/include/**/*.h",
- "utils/unittest/googlemock/src/*.cc",
- ],
- exclude = ["utils/unittest/googlemock/src/gmock-all.cc"],
- ),
- hdrs = [
- "utils/unittest/googlemock/include/gmock/gmock.h",
- "utils/unittest/googlemock/include/gmock/gmock-matchers.h",
- ],
- copts = llvm_copts,
- includes = [
- "include",
- "utils/unittest/googlemock/include",
- ],
- deps = [":gtest"],
-)
-
py_binary(
name = "lit",
testonly = True,
copts = llvm_copts,
deps = [
":Support",
- ":gmock",
+ "//third-party/unittest:gmock",
],
)
deps = [
":Support",
":config",
- ":gmock",
- ":gtest",
+ "//third-party/unittest:gmock",
+ "//third-party/unittest:gtest",
],
)
"//llvm:Core",
"//llvm:Support",
"//llvm:TestingSupport",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
"//llvm:Support",
"//llvm:TestingSupport",
"//llvm:TransformUtils",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
"//llvm:AsmParser",
"//llvm:Core",
"//llvm:Support",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
"//llvm:BitWriter",
"//llvm:Core",
"//llvm:Support",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
"//llvm:BitstreamReader",
"//llvm:BitstreamWriter",
"//llvm:Support",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
"//llvm:Support",
"//llvm:Target",
"//llvm:TestingSupport",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
"//llvm:FileCheckLib",
"//llvm:Support",
"//llvm:Target",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
"//llvm:ObjectYAML",
"//llvm:Support",
"//llvm:TestingSupport",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
deps = [
"//llvm:Debuginfod",
"//llvm:TestingSupport",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
"//llvm:ExecutionEngine",
"//llvm:Interpreter",
"//llvm:Support",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
"//llvm:MCJIT",
"//llvm:Passes",
"//llvm:Support",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
"//llvm:OrcJIT",
"//llvm:Support",
"//llvm:TestingSupport",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
"//llvm:FileCheckLib",
"//llvm:Support",
"//llvm:TestingSupport",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
"//llvm:Support",
"//llvm:TestingSupport",
"//llvm:config",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
deps = [
"//llvm:LineEditor",
"//llvm:Support",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
"//llvm:FrontendOpenMP",
"//llvm:Passes",
"//llvm:Support",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
"//llvm:Core",
"//llvm:Linker",
"//llvm:Support",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
"//llvm:MC",
"//llvm:MCDisassembler",
"//llvm:Support",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
"//llvm:Core",
"//llvm:Support",
"//llvm:Target",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
"//llvm:Object",
"//llvm:ObjectYAML",
"//llvm:TestingSupport",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
"//llvm:Object",
"//llvm:ObjectYAML",
"//llvm:TestingSupport",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
"//llvm:ObjectYAML",
"//llvm:Support",
"//llvm:TestingSupport",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
":option_tests_gen",
"//llvm:Option",
"//llvm:Support",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
"//llvm:BitReader",
"//llvm:Remarks",
"//llvm:Support",
- "//llvm:gtest",
- "//llvm:gtest_main",
"//llvm:remark_linker",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
"//llvm:ProfileData",
"//llvm:Support",
"//llvm:TestingSupport",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
"//llvm:Support",
"//llvm:TestingSupport",
"//llvm:config",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
"//llvm:AllTargetsCodeGens",
"//llvm:Support",
"//llvm:config",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
":automata_tables_gen",
"//llvm:Support",
"//llvm:TableGen",
- "//llvm:gtest",
- "//llvm:gtest_main",
"//llvm:tblgen",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
],
deps = [
"//llvm:AArch64CodeGen",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
deps = [
"//llvm:Support",
"//llvm:TestingADT",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
"//llvm:Support",
"//llvm:TestingSupport",
"//llvm:TransformUtils",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
"//llvm:MCDisassembler",
"//llvm:Support",
"//llvm:TestingSupport",
- "//llvm:gtest",
- "//llvm:gtest_main",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
],
)
]),
deps = [
"//llvm:TestingSupport",
- "//llvm:gtest_main",
"//mlir:IR",
"//mlir/test:TestDialect",
+ "//third-party/unittest:gtest_main",
],
)
]),
deps = [
"//llvm:TestingSupport",
- "//llvm:gtest_main",
"//mlir:ControlFlowInterfaces",
"//mlir:DLTIDialect",
"//mlir:DataLayoutInterfaces",
"//mlir:InferIntRangeInterface",
"//mlir:InferTypeOpInterface",
"//mlir:Parser",
+ "//third-party/unittest:gtest_main",
],
)
deps = [
"//llvm:Support",
"//llvm:TestingSupport",
- "//llvm:gtest_main",
"//mlir:Support",
+ "//third-party/unittest:gtest_main",
],
)
]),
deps = [
"//llvm:TestingSupport",
- "//llvm:gtest_main",
"//mlir:Analysis",
"//mlir:FuncDialect",
"//mlir:IR",
"//mlir:Pass",
+ "//third-party/unittest:gtest_main",
],
)
"Rewrite/*.h",
]),
deps = [
- "//llvm:gtest_main",
"//mlir:IR",
"//mlir:Rewrite",
+ "//third-party/unittest:gtest_main",
],
)
]),
deps = [
"//llvm:TestingSupport",
- "//llvm:gtest_main",
"//mlir:Dialect",
+ "//third-party/unittest:gtest_main",
],
)
]),
deps = [
"//llvm:TestingSupport",
- "//llvm:gtest_main",
"//mlir:MemRefDialect",
+ "//third-party/unittest:gtest_main",
],
)
]),
deps = [
"//llvm:TestingSupport",
- "//llvm:gtest_main",
"//mlir:QuantOps",
"//mlir:Transforms",
+ "//third-party/unittest:gtest_main",
],
)
"Dialect/SCF/*.h",
]),
deps = [
- "//llvm:gtest_main",
"//mlir:FuncDialect",
"//mlir:Parser",
"//mlir:SCFDialect",
+ "//third-party/unittest:gtest_main",
],
)
]),
deps = [
"//llvm:TestingSupport",
- "//llvm:gtest_main",
"//mlir:SparseTensorUtils",
+ "//third-party/unittest:gtest_main",
],
)
]),
deps = [
"//llvm:TestingSupport",
- "//llvm:gtest_main",
"//mlir:SPIRVDeserialization",
"//mlir:SPIRVDialect",
"//mlir:SPIRVSerialization",
+ "//third-party/unittest:gtest_main",
],
)
]),
deps = [
"//llvm:TestingSupport",
- "//llvm:gtest_main",
"//mlir:FuncDialect",
"//mlir:TransformDialect",
+ "//third-party/unittest:gtest_main",
],
)
]),
deps = [
"//llvm:TestingSupport",
- "//llvm:gtest_main",
"//mlir:DialectUtils",
+ "//third-party/unittest:gtest_main",
],
)
":PassIncGen",
"//llvm:Support",
"//llvm:TestingSupport",
- "//llvm:gtest_main",
"//mlir:IR",
"//mlir:TableGen",
"//mlir/test:TestDialect",
+ "//third-party/unittest:gtest_main",
],
)
"Transforms/*.h",
]),
deps = [
- "//llvm:gtest_main",
"//mlir:AffineAnalysis",
"//mlir:IR",
"//mlir:Parser",
"//mlir:Pass",
"//mlir:TransformUtils",
"//mlir:Transforms",
+ "//third-party/unittest:gtest_main",
],
)
]),
deps = [
"//llvm:TestingSupport",
- "//llvm:gtest_main",
"//mlir:AffineAnalysis",
"//mlir:Analysis",
"//mlir:IR",
"//mlir:Parser",
+ "//third-party/unittest:gtest_main",
],
)
"Conversion/*/*.h",
]),
deps = [
- "//llvm:gtest_main",
"//mlir:ArithDialect",
"//mlir:PDLToPDLInterp",
+ "//third-party/unittest:gtest_main",
],
)
],
deps = [
"//llvm:TestingSupport",
- "//llvm:gtest_main",
"//mlir:AllPassesAndDialects",
"//mlir:Analysis",
"//mlir:ExecutionEngine",
"//mlir:MemRefToLLVM",
"//mlir:mlir_c_runner_utils",
"//mlir:mlir_runner_utils",
+ "//third-party/unittest:gtest_main",
],
)
--- /dev/null
+# This file is licensed under the Apache License v2.0 with LLVM Exceptions.
+# See https://llvm.org/LICENSE.txt for license information.
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+
+package(default_visibility = ["//visibility:public"])
+
+licenses(["notice"])
+
+exports_files(["LICENSE.TXT"])
+
+# It may be tempting to add compiler flags here, but that should be avoided.
+# The necessary warnings and other compile flags should be provided by the
+# toolchain or the `.bazelrc` file. This is just a workaround until we have a
+# widely available feature to enable unlimited stack frame instead of using
+# this `Make` variable.
+llvm_copts = [
+ "$(STACK_FRAME_UNLIMITED)",
+]
+
+# A hacky library to expose some internal headers of gtest to its own
+# implementation source files using a stripped include prefix rather than
+# file-relative-inclusion.
+#
+# FIXME: This file should be in `textual_hdrs` instead of `hdrs`, but
+# unfortunately that doesn't work with `strip_include_prefix`:
+# https://github.com/bazelbuild/bazel/issues/12424
+#
+# For now, simply disable parsing and header modules.
+cc_library(
+ name = "gtest_internal_headers",
+ testonly = True,
+ hdrs = ["googletest/src/gtest-internal-inl.h"],
+ features = [
+ "-parse_headers",
+ "-header_modules",
+ ],
+ strip_include_prefix = "googletest",
+)
+
+cc_library(
+ name = "gtest",
+ testonly = True,
+ srcs = glob(
+ [
+ "googletest/include/**/*.h",
+ "googletest/src/*.cc",
+ ],
+ exclude = [
+ "googletest/src/gtest-all.cc",
+ "googletest/include/gtest/gtest_pred_impl.h",
+ ],
+ ) + [
+ ],
+ hdrs = ["googletest/include/gtest/gtest.h"],
+ copts = llvm_copts,
+ defines = [
+ "GTEST_HAS_RTTI=0",
+ "__STDC_LIMIT_MACROS",
+ "__STDC_CONSTANT_MACROS",
+ ] + select({
+ "@bazel_tools//src/conditions:windows": ["GTEST_USE_OWN_TR1_TUPLE=0"],
+ "//conditions:default": ["GTEST_USE_OWN_TR1_TUPLE=1"],
+ }),
+ includes = [
+ "googletest/include",
+ "include",
+ ],
+ textual_hdrs = [
+ "googletest/include/gtest/gtest_pred_impl.h",
+ ],
+ deps = [
+ ":gtest_internal_headers",
+ "//llvm:Support",
+ ],
+)
+
+cc_library(
+ name = "gtest_main",
+ testonly = True,
+ srcs = ["UnitTestMain/TestMain.cpp"],
+ copts = llvm_copts,
+ deps = [
+ ":gmock",
+ ":gtest",
+ "//llvm:Support",
+ ],
+)
+
+cc_library(
+ name = "gmock",
+ testonly = True,
+ srcs = glob(
+ [
+ "googlemock/include/**/*.h",
+ "googlemock/src/*.cc",
+ ],
+ exclude = ["googlemock/src/gmock-all.cc"],
+ ),
+ hdrs = [
+ "googlemock/include/gmock/gmock.h",
+ "googlemock/include/gmock/gmock-matchers.h",
+ ],
+ copts = llvm_copts,
+ includes = [
+ "googlemock/include",
+ "include",
+ ],
+ deps = [":gtest"],
+)