Skip to content

Commit

Permalink
Both the xla_internal_test_main library and the gunit_main library d…
Browse files Browse the repository at this point in the history
…efine the symbol main.

  When using static linking, the causes compilation to fail if the test depends on both libraries
  since a symbol is defined twice. For tests that depend on xla_internal_test_main use the gunit
  library instead of gunit_main.

PiperOrigin-RevId: 696950300
  • Loading branch information
Google-ML-Automation committed Nov 15, 2024
1 parent 2d07e59 commit dd9a463
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions xla/tests/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,7 @@ xla_test(
":xla_internal_test_main",
"//xla:error_spec",
"@com_google_absl//absl/strings",
"@com_google_googletest//:gtest_main",
"@com_google_googletest//:gtest",
"@tsl//tsl/platform:test",
],
)
Expand Down Expand Up @@ -976,7 +976,7 @@ xla_test(
"@com_google_absl//absl/log",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/types:span",
"@com_google_googletest//:gtest_main",
"@com_google_googletest//:gtest",
"@eigen_archive//:eigen3",
"@tsl//tsl/platform:ml_dtypes",
"@tsl//tsl/platform:statusor",
Expand Down Expand Up @@ -1200,7 +1200,7 @@ xla_test(
"//xla/hlo/builder:xla_builder",
"//xla/hlo/builder/lib:constants",
"//xla/tsl/lib/core:status_test_util",
"@com_google_googletest//:gtest_main",
"@com_google_googletest//:gtest",
"@tsl//tsl/platform:ml_dtypes",
"@tsl//tsl/platform:test",
],
Expand Down Expand Up @@ -1516,7 +1516,7 @@ xla_test(
":xla_internal_test_main",
"//xla:test",
"//xla/hlo/builder:xla_builder",
"@com_google_googletest//:gtest_main",
"@com_google_googletest//:gtest",
"@tsl//tsl/platform:ml_dtypes",
],
)
Expand Down Expand Up @@ -1762,7 +1762,7 @@ xla_test_library(
"@com_google_absl//absl/log:check",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/types:span",
"@com_google_googletest//:gtest_main",
"@com_google_googletest//:gtest",
"@tsl//tsl/platform:errors",
"@tsl//tsl/platform:statusor",
"@tsl//tsl/platform:test",
Expand Down Expand Up @@ -1835,7 +1835,7 @@ xla_test(
"//xla/service:platform_util",
"//xla/stream_executor:platform",
"@com_google_absl//absl/types:span",
"@com_google_googletest//:gtest_main",
"@com_google_googletest//:gtest",
"@tsl//tsl/platform:test",
],
)
Expand Down Expand Up @@ -1873,7 +1873,7 @@ xla_test(
"//xla:error_spec",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:str_format",
"@com_google_googletest//:gtest_main",
"@com_google_googletest//:gtest",
],
)

Expand All @@ -1886,7 +1886,7 @@ xla_test(
":test_macros_header",
":xla_internal_test_main",
"//xla:error_spec",
"@com_google_googletest//:gtest_main",
"@com_google_googletest//:gtest",
],
)

Expand All @@ -1902,7 +1902,7 @@ xla_test(
":xla_internal_test_main",
"//xla:literal",
"//xla:literal_util",
"@com_google_googletest//:gtest_main",
"@com_google_googletest//:gtest",
"@tsl//tsl/platform:statusor",
],
)
Expand Down Expand Up @@ -2193,7 +2193,7 @@ xla_test(
"@com_google_absl//absl/log",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/types:span",
"@com_google_googletest//:gtest_main",
"@com_google_googletest//:gtest",
"@tsl//tsl/platform:ml_dtypes",
"@tsl//tsl/platform:statusor",
],
Expand Down Expand Up @@ -2501,7 +2501,7 @@ xla_test(
"//xla/service:collective_pipeliner",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings:string_view",
"@com_google_googletest//:gtest_main",
"@com_google_googletest//:gtest",
],
)

Expand Down Expand Up @@ -2600,7 +2600,7 @@ xla_test(
"//xla/service:hlo_proto_cc",
"//xla/tsl/lib/core:status_test_util",
"@com_google_absl//absl/status",
"@com_google_googletest//:gtest_main",
"@com_google_googletest//:gtest",
"@tsl//tsl/platform:env",
"@tsl//tsl/platform:status",
"@tsl//tsl/platform:statusor",
Expand Down Expand Up @@ -3123,7 +3123,7 @@ xla_test(
"//xla:xla_data_proto_cc",
"//xla/hlo/builder:xla_builder",
"@com_google_absl//absl/log:check",
"@com_google_googletest//:gtest_main",
"@com_google_googletest//:gtest",
"@tsl//tsl/platform:ml_dtypes",
],
)
Expand Down Expand Up @@ -3316,7 +3316,7 @@ xla_test(
"@com_google_absl//absl/algorithm:container",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/types:span",
"@com_google_googletest//:gtest_main",
"@com_google_googletest//:gtest",
"@tsl//tsl/platform:status",
"@tsl//tsl/platform:statusor",
"@tsl//tsl/platform:test",
Expand Down

0 comments on commit dd9a463

Please sign in to comment.