File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -389,6 +389,7 @@ endfunction()
389389# add_swift_host_library(name
390390# [SHARED]
391391# [STATIC]
392+ # [OBJECT]
392393# [LLVM_LINK_COMPONENTS comp1 ...]
393394# source1 [source2 source3 ...])
394395#
@@ -401,6 +402,9 @@ endfunction()
401402# STATIC
402403# Build a static library.
403404#
405+ # OBJECT
406+ # Build an object library
407+ #
404408# LLVM_LINK_COMPONENTS
405409# LLVM components this library depends on.
406410#
@@ -409,7 +413,8 @@ endfunction()
409413function (add_swift_host_library name )
410414 set (options
411415 SHARED
412- STATIC )
416+ STATIC
417+ OBJECT)
413418 set (single_parameter_options)
414419 set (multiple_parameter_options
415420 LLVM_LINK_COMPONENTS)
@@ -423,8 +428,8 @@ function(add_swift_host_library name)
423428
424429 translate_flags(ASHL "${options} " )
425430
426- if (NOT ASHL_SHARED AND NOT ASHL_STATIC)
427- message (FATAL_ERROR "Either SHARED or STATIC must be specified" )
431+ if (NOT ASHL_SHARED AND NOT ASHL_STATIC AND NOT ASHL_OBJECT )
432+ message (FATAL_ERROR "One of SHARED/ STATIC/OBJECT must be specified" )
428433 endif ()
429434
430435 if (XCODE)
@@ -449,6 +454,8 @@ function(add_swift_host_library name)
449454 set (libkind SHARED)
450455 elseif (ASHL_STATIC)
451456 set (libkind STATIC )
457+ elseif (ASHL_OBJECT)
458+ set (libkind OBJECT)
452459 endif ()
453460
454461 add_library (${name} ${libkind} ${ASHL_SOURCES} )
You can’t perform that action at this time.
0 commit comments