Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions mlir/lib/ExecutionEngine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ if(LLVM_ENABLE_PIC)
set_property(TARGET mlir_float16_utils PROPERTY CXX_STANDARD 17)
target_compile_definitions(mlir_float16_utils PRIVATE mlir_float16_utils_EXPORTS)

if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
# TODO: This support library is only used on Linux builds until we figure
if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Darwin")
# TODO: This support library is only used on Linux and Mac builds until we figure
# out how to hide LLVM symbols in a way that works for all platforms.
add_mlir_library(mlir_apfloat_wrappers
SHARED
Expand All @@ -185,7 +185,7 @@ if(LLVM_ENABLE_PIC)
)
target_compile_definitions(mlir_apfloat_wrappers PRIVATE mlir_apfloat_wrappers_EXPORTS)
# Hide LLVM symbols to avoid ODR violations.
target_link_options(mlir_apfloat_wrappers PRIVATE "-Wl,--exclude-libs,ALL")
target_link_options(mlir_apfloat_wrappers PRIVATE $<$<PLATFORM_ID:Linux>:LINKER:--exclude-libs,ALL>)
endif()

add_subdirectory(SparseTensor)
Expand All @@ -205,8 +205,8 @@ if(LLVM_ENABLE_PIC)
set_property(TARGET mlir_c_runner_utils PROPERTY CXX_STANDARD 17)
target_compile_definitions(mlir_c_runner_utils PRIVATE mlir_c_runner_utils_EXPORTS)

# Conditionally link apfloat wrappers only on Linux.
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
# Conditionally link apfloat wrappers only on Linux and Mac.
if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Darwin")
target_link_libraries(mlir_c_runner_utils PUBLIC mlir_apfloat_wrappers)
endif()

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// REQUIRES: system-linux
// REQUIRES: system-linux || system-darwin
// TODO: Run only on Linux until we figure out how to build
// mlir_apfloat_wrappers in a platform-independent way.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// REQUIRES: system-linux
// REQUIRES: system-linux || system-darwin
// TODO: Run only on Linux until we figure out how to build
// mlir_apfloat_wrappers in a platform-independent way.

Expand Down
4 changes: 2 additions & 2 deletions mlir/test/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@ def find_real_python_interpreter():
"not",
]

if "Linux" in config.host_os:
# TODO: Run only on Linux until we figure out how to build
if "Linux" in config.host_os or "Darwin" in config.host_os:
# TODO: Run only on Linux and Mac until we figure out how to build
# mlir_apfloat_wrappers in a platform-independent way.
tools.extend([add_runtime("mlir_apfloat_wrappers")])

Expand Down