Skip to content

Commit 899723e

Browse files
committed
Post-merge fixes
1 parent 05d8121 commit 899723e

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

flang-rt/cmake/modules/AddFlangRT.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,13 +143,13 @@ function (add_flangrt_library name)
143143
if (build_shared)
144144
add_library(${name}.default ALIAS ${name_shared})
145145
else ()
146-
add_library(${name}.default ALIAS ${name})
146+
add_library(${name}.default ALIAS ${name_static})
147147
endif ()
148148
else ()
149149
if (build_static)
150150
add_library(${name}.default ALIAS ${name_static})
151151
else ()
152-
add_library(${name}.default ALIAS ${name})
152+
add_library(${name}.default ALIAS ${name_shared})
153153
endif ()
154154
endif ()
155155

flang-rt/lib/flang_rt/CMakeLists.txt

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -137,16 +137,10 @@ if (NOT WIN32)
137137
enable_cuda_compilation(flang_rt.static "${supported_sources}")
138138
enable_omp_offload_compilation(flang_rt.static "${supported_sources}")
139139

140-
# Select a default runtime, which is used for unittests.
141-
if (TARGET flang_rt.shared AND BUILD_SHARED_LIBS)
142-
set(default_flang_rt "flang_rt.shared")
143-
elseif (TARGET flang_rt.static)
144-
set(default_flang_rt "flang_rt.static")
145-
else ()
146-
set(default_flang_rt "flang_rt.shared")
147-
endif ()
148-
add_library(flang_rt ALIAS "${default_flang_rt}")
149-
add_library(flang_rt.unittest ALIAS "${default_flang_rt}")
140+
# Select a default runtime, which is used for unit and regression tests.
141+
get_target_property(default_target flang_rt.default ALIASED_TARGET)
142+
add_library(flang_rt ALIAS "${default_target}")
143+
add_library(flang_rt.unittest ALIAS "${default_target}")
150144
else()
151145
# Target for building all versions of the runtime
152146
add_custom_target(flang_rt)

0 commit comments

Comments
 (0)