@@ -17,7 +17,7 @@ function(handle_swift_sources
17
17
cmake_parse_arguments (SWIFTSOURCES
18
18
"IS_MAIN;IS_STDLIB;IS_STDLIB_CORE;IS_SDK_OVERLAY;EMBED_BITCODE"
19
19
"SDK;ARCHITECTURE;INSTALL_IN_COMPONENT"
20
- "DEPENDS;API_NOTES; COMPILE_FLAGS;MODULE_NAME"
20
+ "DEPENDS;COMPILE_FLAGS;MODULE_NAME"
21
21
${ARGN} )
22
22
translate_flag(${SWIFTSOURCES_IS_MAIN} "IS_MAIN" IS_MAIN_arg)
23
23
translate_flag(${SWIFTSOURCES_IS_STDLIB} "IS_STDLIB" IS_STDLIB_arg)
@@ -90,7 +90,6 @@ function(handle_swift_sources
90
90
FLAGS ${swift_compile_flags}
91
91
SDK ${SWIFTSOURCES_SDK}
92
92
ARCHITECTURE ${SWIFTSOURCES_ARCHITECTURE}
93
- API_NOTES ${SWIFTSOURCES_API_NOTES}
94
93
MODULE_NAME ${SWIFTSOURCES_MODULE_NAME}
95
94
${IS_MAIN_arg}
96
95
${IS_STDLIB_arg}
@@ -159,7 +158,7 @@ function(_compile_swift_files
159
158
cmake_parse_arguments (SWIFTFILE
160
159
"IS_MAIN;IS_STDLIB;IS_STDLIB_CORE;IS_SDK_OVERLAY;EMBED_BITCODE"
161
160
"OUTPUT;MODULE_NAME;INSTALL_IN_COMPONENT"
162
- "SOURCES;FLAGS;DEPENDS;SDK;ARCHITECTURE;API_NOTES; OPT_FLAGS;MODULE_DIR"
161
+ "SOURCES;FLAGS;DEPENDS;SDK;ARCHITECTURE;OPT_FLAGS;MODULE_DIR"
163
162
${ARGN} )
164
163
165
164
# Check arguments.
@@ -360,28 +359,6 @@ function(_compile_swift_files
360
359
set (swift_compiler_tool_dep "swift" )
361
360
endif ()
362
361
363
- # Generate API notes if requested.
364
- set (command_create_apinotes)
365
- set (depends_create_apinotes)
366
- set (apinote_files)
367
-
368
- foreach (apinote_module ${SWIFTFILE_API_NOTES} )
369
- set (apinote_file "${module_dir} /${apinote_module} .apinotes" )
370
- set (apinote_input_file
371
- "${SWIFT_API_NOTES_PATH} /${apinote_module} .apinotes" )
372
-
373
- list (APPEND command_create_apinotes
374
- COMMAND
375
- "${CMAKE_COMMAND} " "-E" "copy_if_different"
376
- "${apinote_input_file} " "${apinote_file} " )
377
- list (APPEND depends_create_apinotes "${apinote_input_file} " )
378
-
379
- list (APPEND apinote_files "${apinote_file} " )
380
- swift_install_in_component("${SWIFTFILE_INSTALL_IN_COMPONENT} "
381
- FILES ${apinote_file}
382
- DESTINATION "lib${LLVM_LIBDIR_SUFFIX} /swift/${library_subdir} " )
383
- endforeach ()
384
-
385
362
# If there are more than one output files, we assume that they are specified
386
363
# otherwise e.g. with an output file map.
387
364
set (output_option)
@@ -405,7 +382,6 @@ function(_compile_swift_files
405
382
endif ()
406
383
407
384
set (standard_outputs ${SWIFTFILE_OUTPUT} )
408
- set (apinotes_outputs ${apinote_files} )
409
385
set (sib_outputs "${sib_file} " )
410
386
set (sibopt_outputs "${sibopt_file} " )
411
387
set (sibgen_outputs "${sibgen_file} " )
@@ -425,8 +401,6 @@ function(_compile_swift_files
425
401
# always gets updated.
426
402
set (command_touch_standard_outputs
427
403
COMMAND "${CMAKE_COMMAND} " -E touch ${standard_outputs} )
428
- set (command_touch_apinotes_outputs
429
- COMMAND "${CMAKE_COMMAND} " -E touch ${apinotes_outputs} )
430
404
set (command_touch_module_outputs
431
405
COMMAND "${CMAKE_COMMAND} " -E touch ${module_outputs} )
432
406
set (command_touch_sib_outputs
@@ -445,22 +419,6 @@ function(_compile_swift_files
445
419
OUTPUT ${obj_dirs}
446
420
COMMENT "Generating obj dirs for ${first_output} " )
447
421
448
- # Generate the api notes if we need them.
449
- if (apinotes_outputs)
450
- add_custom_command_target(
451
- api_notes_dependency_target
452
- # Create API notes before compiling, because this will affect the APIs
453
- # the overlay sees.
454
- ${command_create_apinotes}
455
- ${command_touch_apinotes_outputs}
456
- COMMAND ""
457
- OUTPUT ${apinotes_outputs}
458
- DEPENDS
459
- ${depends_create_apinotes}
460
- ${obj_dirs_dependency_target}
461
- COMMENT "Copying API notes for ${first_output} " )
462
- endif ()
463
-
464
422
# Then we can compile both the object files and the swiftmodule files
465
423
# in parallel in this target for the object file, and ...
466
424
@@ -484,7 +442,7 @@ function(_compile_swift_files
484
442
DEPENDS
485
443
${swift_compiler_tool_dep}
486
444
${file_path} ${source_files} ${SWIFTFILE_DEPENDS}
487
- ${swift_ide_test_dependency} ${api_notes_dependency_target}
445
+ ${swift_ide_test_dependency}
488
446
${obj_dirs_dependency_target}
489
447
COMMENT "Compiling ${first_output} " )
490
448
set ("${dependency_target_out_var_name} " "${dependency_target} " PARENT_SCOPE)
@@ -518,7 +476,7 @@ function(_compile_swift_files
518
476
DEPENDS
519
477
${swift_compiler_tool_dep}
520
478
${source_files} ${SWIFTFILE_DEPENDS}
521
- ${swift_ide_test_dependency} ${api_notes_dependency_target}
479
+ ${swift_ide_test_dependency}
522
480
${obj_dirs_dependency_target}
523
481
COMMENT "Generating ${module_file} " )
524
482
set ("${dependency_module_target_out_var_name} " "${module_dependency_target} " PARENT_SCOPE)
0 commit comments