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()
389
389
# add_swift_host_library(name
390
390
# [SHARED]
391
391
# [STATIC]
392
+ # [OBJECT]
392
393
# [LLVM_LINK_COMPONENTS comp1 ...]
393
394
# source1 [source2 source3 ...])
394
395
#
@@ -401,6 +402,9 @@ endfunction()
401
402
# STATIC
402
403
# Build a static library.
403
404
#
405
+ # OBJECT
406
+ # Build an object library
407
+ #
404
408
# LLVM_LINK_COMPONENTS
405
409
# LLVM components this library depends on.
406
410
#
@@ -409,7 +413,8 @@ endfunction()
409
413
function(add_swift_host_library name)
410
414
set(options
411
415
SHARED
412
- STATIC)
416
+ STATIC
417
+ OBJECT)
413
418
set(single_parameter_options)
414
419
set(multiple_parameter_options
415
420
LLVM_LINK_COMPONENTS)
@@ -423,8 +428,8 @@ function(add_swift_host_library name)
423
428
424
429
translate_flags(ASHL " ${options} ")
425
430
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 ")
428
433
endif()
429
434
430
435
if(XCODE)
@@ -449,6 +454,8 @@ function(add_swift_host_library name)
449
454
set(libkind SHARED)
450
455
elseif(ASHL_STATIC)
451
456
set(libkind STATIC)
457
+ elseif(ASHL_OBJECT)
458
+ set(libkind OBJECT)
452
459
endif()
453
460
454
461
add_library(${name} ${libkind} ${ASHL_SOURCES} )
You can’t perform that action at this time.
0 commit comments