Skip to content

Commit

Permalink
Try response files
Browse files Browse the repository at this point in the history
  • Loading branch information
mtsokol committed Nov 4, 2024
1 parent 9d0995c commit 773ddb1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ add_mlir_python_common_capi_library(FinchPythonCAPI
# TODO: Remove this in favor of showing fine grained registration once
# available.
MLIRPythonExtension.ExecutionEngine
#MLIRPythonExtension.RegisterEverything
MLIRPythonExtension.RegisterEverything
#MLIRPythonSources.ExecutionEngine
#MLIRPythonSources.Dialects
MLIRPythonSources #.Core
Expand Down
17 changes: 16 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,21 @@ def build_extension(self, ext: CMakeExtension) -> None:

llvm_lit = "llvm-lit.py" if platform.system() == "Windows" else "llvm-lit"

extra_flags_dialect = [
"-DCMAKE_C_COMPILER=cl",
"-DCMAKE_CXX_COMPILER=cl",
"-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded",
"-DCMAKE_C_FLAGS=/MT",
"-DCMAKE_CXX_FLAGS=/MT",
"-DCMAKE_C_USE_RESPONSE_FILE_FOR_INCLUDES=ON",
"-DCMAKE_CXX_USE_RESPONSE_FILE_FOR_INCLUDES=ON",
"-DCMAKE_C_USE_RESPONSE_FILE_FOR_LIBRARIES=ON",
"-DCMAKE_CXX_USE_RESPONSE_FILE_FOR_LIBRARIES=ON",
"-DCMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS=ON",
"-DCMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS=ON",
"-DCMAKE_NINJA_FORCE_RESPONSE_FILE=ON",
]

# BUILD FINCH DIALECT
dialect_cmake_args = [
"-G Ninja",
Expand All @@ -86,7 +101,7 @@ def build_extension(self, ext: CMakeExtension) -> None:
"-DLLVM_ENABLE_ZLIB=OFF",
"-DLLVM_ENABLE_ZSTD=OFF",
f"-DPython3_EXECUTABLE={PYTHON_EXECUTABLE}",
*extra_flags,
*extra_flags_dialect,
]

subprocess.run(
Expand Down

0 comments on commit 773ddb1

Please sign in to comment.