Skip to content

Commit c1c807b

Browse files
committed
Post-merge fixes
1 parent 6228dd4 commit c1c807b

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

flang-rt/cmake/modules/AddFlangRT.cmake

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -139,17 +139,19 @@ function (add_flangrt_library name)
139139
endif ()
140140

141141
# Provide a default target if building both and which exists in either setting.
142-
if (BUILD_SHARED_LIBS)
143-
if (build_shared)
144-
add_library(${name}.default ALIAS ${name_shared})
145-
else ()
146-
add_library(${name}.default ALIAS ${name_static})
147-
endif ()
148-
else ()
149-
if (build_static)
150-
add_library(${name}.default ALIAS ${name_static})
142+
if (libtargets)
143+
if (BUILD_SHARED_LIBS)
144+
if (build_shared)
145+
add_library(${name}.default ALIAS ${name_shared})
146+
else ()
147+
add_library(${name}.default ALIAS ${name_static})
148+
endif ()
151149
else ()
152-
add_library(${name}.default ALIAS ${name_shared})
150+
if (build_static)
151+
add_library(${name}.default ALIAS ${name_static})
152+
else ()
153+
add_library(${name}.default ALIAS ${name_shared})
154+
endif ()
153155
endif ()
154156
endif ()
155157

0 commit comments

Comments
 (0)