Skip to content

Commit 0735537

Browse files
committed
[Flang-RT] Append to library subdir
The code intended to append more directories as required, instead of discarding the previous steps. NFCI accept on Apple.
1 parent da69147 commit 0735537

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

flang-rt/cmake/modules/GetToolchainDirs.cmake

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,17 @@
3232
# added unconditionally to the library search path by
3333
# ToolChain::getArchSpecificLibPaths(...).
3434
function (get_toolchain_library_subdir outvar)
35-
if (NOT APPLE)
36-
set(outval "lib")
37-
else ()
35+
set(outval "lib")
36+
37+
if (APPLE)
3838
# Required to be "darwin" for MachO toolchain.
3939
get_toolchain_os_dirname(os_dirname)
40-
set(outval "lib/${os_dirname}")
40+
set(outval "${outval}/${os_dirname}")
41+
else ()
42+
get_toolchain_arch_dirname(arch_dirname)
43+
set(outval "${outval}/${arch_dirname}")
4144
endif ()
4245

43-
get_toolchain_arch_dirname(arch_dirname)
44-
set(outval "lib/${arch_dirname}")
45-
4646
set(${outvar} "${outval}" PARENT_SCOPE)
4747
endfunction ()
4848

0 commit comments

Comments
 (0)