Skip to content

Conversation

makslevental
Copy link
Contributor

@makslevental makslevental commented Sep 24, 2025

#160508 wasn't the correct fix - the fix just disabled the test because

if not config.llvm_shared_libs_build:
is now always False (if not "0" is always False). This PR is the correct fix.

@makslevental makslevental enabled auto-merge (squash) September 24, 2025 15:07
@llvmbot llvmbot added mlir bazel "Peripheral" support tier build system: utils/bazel labels Sep 24, 2025
@llvmbot
Copy link
Member

llvmbot commented Sep 24, 2025

@llvm/pr-subscribers-mlir

Author: Maksim Levental (makslevental)

Changes

#160508 wasn't the correct fix - the fix just disabled the test because

if not config.llvm_shared_libs_build:
is now always False (if not "0" is always False). This PR is the correct fix.


Full diff: https://github.com/llvm/llvm-project/pull/160539.diff

2 Files Affected:

  • (modified) mlir/test/lit.site.cfg.py.in (+1-1)
  • (modified) utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel (+1)
diff --git a/mlir/test/lit.site.cfg.py.in b/mlir/test/lit.site.cfg.py.in
index c7a0bbe114fe2..1aaf7989e3ce5 100644
--- a/mlir/test/lit.site.cfg.py.in
+++ b/mlir/test/lit.site.cfg.py.in
@@ -60,7 +60,7 @@ config.mlir_run_cuda_sm80_tests = @MLIR_RUN_CUDA_SM80_TESTS@
 config.mlir_run_cuda_sm80_lt_tests = @MLIR_RUN_CUDA_SM80_LT_TESTS@
 config.mlir_run_cuda_sm90_tests = @MLIR_RUN_CUDA_SM90_TESTS@
 config.mlir_include_integration_tests = @MLIR_INCLUDE_INTEGRATION_TESTS@
-config.llvm_shared_libs_build = "@BUILD_SHARED_LIBS@"
+config.llvm_shared_libs_build = @BUILD_SHARED_LIBS@
 config.arm_emulator_executable = "@ARM_EMULATOR_EXECUTABLE@"
 # Some tests marked with 'UNSUPPORTED: target=aarch64{{.*}}' are still run when
 # configured with ARM_EMULATOR_EXECUTABLE and the default target is not aarch64.
diff --git a/utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel
index 469fcee8d9748..7e36d0ba787b6 100644
--- a/utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel
@@ -31,6 +31,7 @@ expand_template(
         "@LIT_SITE_CFG_IN_HEADER@": LIT_SITE_CFG_IN_HEADER,
         "@LLVM_TOOLS_DIR@": package_path("//llvm:BUILD"),
         "@ENABLE_SHARED@": "1",
+        "@BUILD_SHARED_LIBS@": "1",
         "@ENABLE_ASSERTIONS@": "1",
         "@MLIR_SOURCE_DIR@": package_path("//mlir:BUILD"),
         "@MLIR_TOOLS_DIR@": package_path("//mlir:BUILD"),

@makslevental makslevental force-pushed the users/makslevental/revert-revert branch from 7d43e6e to 843567a Compare September 24, 2025 15:10
@makslevental makslevental changed the title [MLIR][Bazel] correctly fix bazel build [MLIR][Bazel] correctly fix bazel build after 59e74a0 Sep 24, 2025
@makslevental makslevental enabled auto-merge (squash) September 24, 2025 15:57
@makslevental makslevental merged commit ef5e5ef into main Sep 24, 2025
10 checks passed
@makslevental makslevental deleted the users/makslevental/revert-revert branch September 24, 2025 16:24
mahesh-attarde pushed a commit to mahesh-attarde/llvm-project that referenced this pull request Oct 3, 2025
llvm#160508 wasn't the correct fix
- the fix just disabled the test because
https://github.com/llvm/llvm-project/blob/59e74a0749203998b3e5fd9bc6525de148db28ab/mlir/test/Examples/standalone/lit.local.cfg#L18
is now always `False` (`if not "0"` is always `False`). This PR is the
correct fix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bazel "Peripheral" support tier build system: utils/bazel mlir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants