File tree Expand file tree Collapse file tree 2 files changed +6
-12
lines changed Expand file tree Collapse file tree 2 files changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -143,13 +143,13 @@ function (add_flangrt_library name)
143
143
if (build_shared )
144
144
add_library (${name} .default ALIAS ${name_shared} )
145
145
else ()
146
- add_library (${name} .default ALIAS ${name } )
146
+ add_library (${name} .default ALIAS ${name_static } )
147
147
endif ()
148
148
else ()
149
149
if (build_static )
150
150
add_library (${name} .default ALIAS ${name_static} )
151
151
else ()
152
- add_library (${name} .default ALIAS ${name } )
152
+ add_library (${name} .default ALIAS ${name_shared } )
153
153
endif ()
154
154
endif ()
155
155
Original file line number Diff line number Diff line change @@ -137,16 +137,10 @@ if (NOT WIN32)
137
137
enable_cuda_compilation (flang_rt.static "${supported_sources} " )
138
138
enable_omp_offload_compilation (flang_rt.static "${supported_sources} " )
139
139
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} " )
150
144
else ()
151
145
# Target for building all versions of the runtime
152
146
add_custom_target (flang_rt )
You can’t perform that action at this time.
0 commit comments