Driver: loosen restrictions for -force-autolink-symbol

On targets which support COMDAT (PE/COFF, ELF), use that to relax the
constraints on the emission of `-force-autolink-symbol` so that it is
possible to use that with `-incremental`.
This commit is contained in:
Saleem Abdulrasool
2019-08-12 09:19:16 -07:00
parent 4ecab47190
commit 1d84cb60a8
5 changed files with 33 additions and 10 deletions

View File

@@ -0,0 +1,11 @@
// RUN: %swiftc_driver -incremental -autolink-force-load %s 2>&1 | %FileCheck -check-prefix=AUTOLINK_FORCE_LOAD %s
// RUN: %swiftc_driver -autolink-force-load -incremental %s 2>&1 | %FileCheck -check-prefix=AUTOLINK_FORCE_LOAD %s
// MACHO targets do not support COMDAT
// UNSUPPORTED: OS=macosx
// UNSUPPORTED: OS=tvos
// UNSUPPORTED: OS=watchos
// UNSUPPORTED: OS=ios
// AUTOLINK_FORCE_LOAD-NOT: error: '-autolink-force-load' is not supported with '-incremental'