Skip to content

[pull] master from apple:master #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 602 commits into from
Jul 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
602 commits
Select commit Hold shift + click to select a range
86cffd7
Merge pull request #32578 from slavapestov/derive-type-witness-before…
slavapestov Jun 27, 2020
f245717
[SourceKit/CodeFormat] Fix multi-line array literal elements not inde…
Jun 27, 2020
53b4ce0
fix confusing protocol diagnostic
OnyekachiSamuel Jun 24, 2020
cbdb274
add protocol self conformance exception note
OnyekachiSamuel Jun 26, 2020
c642a7f
update diagnostics
OnyekachiSamuel Jun 26, 2020
434607d
fix broken tests
OnyekachiSamuel Jun 26, 2020
65af826
test: xfail Constraints/operator.swift
nkcsgexi Jun 27, 2020
4ef82a8
Merge pull request #32586 from nkcsgexi/64844584
nkcsgexi Jun 27, 2020
1715021
[TypeChecker] NFC: Clarify flaky diagnostic XFAIL
xedin Jun 27, 2020
713c836
Merge pull request #32587 from xedin/rdar-64844584
xedin Jun 28, 2020
e25934f
Merge pull request #32451 from stephencelis/patch-1
swift-ci Jun 28, 2020
057dbbd
Sema: Filter out conflicting requirements for protocol stubs
AnthonyLatsis Jun 27, 2020
8a39f82
Merge pull request #32565 from AndrewSB/fixed-in-cmake-2.8.4
compnerd Jun 28, 2020
2a200b2
SourceKit: silence as `-Wmisleading-indent` warning (NFCI)
compnerd Jun 26, 2020
bbbe67e
Merge pull request #32576 from compnerd/brace-yourself
compnerd Jun 29, 2020
364981f
SwiftPrivateThreadExtras: correct misuse of API
compnerd Jun 22, 2020
34cbb30
test: unixise some paths in diagnostics tests (NFCI)
compnerd Jun 29, 2020
7895a4e
test: unixise path for Parse.source_locs (NFCI)
compnerd Jun 29, 2020
ebf01c9
Merge pull request #32593 from compnerd/dangling
compnerd Jun 29, 2020
c42c8d2
[RemoteMirror] Gracefully handle a NULL TypeInfo passed to convertChild.
mikeash Jun 29, 2020
a817409
test: make stdlib.NumericParsing Python 3 friendly
compnerd Jun 25, 2020
0893f08
Merge pull request #32574 from gottesmm/pr-0a4cbd7fcfed51ea527c5cce60…
gottesmm Jun 29, 2020
8307c6a
[SourceKit] Report 'key.reusingastcontext' in completion like requests
rintaro Jun 29, 2020
3d6bc24
Merge pull request #32595 from compnerd/path-parsing
compnerd Jun 29, 2020
d2b68c7
Merge pull request #32594 from compnerd/diagnostic-medicine
compnerd Jun 29, 2020
6d63d95
test: attempt to quote python interpreter path
compnerd Jun 29, 2020
63d9acd
[Sema] Report public use of local SPIs by the exportability checker
xymus May 14, 2020
c2452b7
Merge pull request #32598 from compnerd/numerically-correct
compnerd Jun 29, 2020
1c58abf
Merge pull request #32575 from nathawes/fix-no-quickhelp-for-shorthan…
Jun 29, 2020
79bdd43
Merge pull request #32493 from augusto2112/elf-shim-metadata-sections
compnerd Jun 29, 2020
caab4f4
[CSGen] Handle incorrect patterns (e.g. referencing unknown types)
xedin Jun 29, 2020
12f4db3
test: make `gen-output-file-map` Python 3 friendly
compnerd Jun 24, 2020
112af9e
test: adjust style for python linter (NFC)
compnerd Jun 29, 2020
bf0a183
[NFC] Move the strto*_l stubs closer to use.
3405691582 Jun 16, 2020
311482d
[NFC] Pull out the win32 implementation.
3405691582 Jun 16, 2020
3cc9d75
[NFC] Gather strto*_l stubs together.
3405691582 Jun 16, 2020
d3a9314
[stdlib] Simplify the strto* platform stubs.
3405691582 Jun 16, 2020
9ee4ebf
[Dependency Scanner] Use `pragma clang module import` in the hack fil…
artemcm Jun 28, 2020
4d3bd22
Merge pull request #32436 from kastiglione/dl/build-script-prioritize…
JDevlieghere Jun 29, 2020
33336df
[SouceKit] Make "ASTContext reusing" optional
rintaro Jun 29, 2020
ff99d65
Merge pull request #32582 from nathawes/array-literal-sub-expr-indent…
Jun 29, 2020
ea5a31d
[NFC] Add a test for constraint generation failures in a pattern binding
hborla Jun 29, 2020
ff2cc35
ASTMangler: Tiny cleanup
slavapestov Jun 27, 2020
bddcda6
[Frontend] Factor out setupDependencyTrackerIfNeeded
hamishknight Jun 29, 2020
7bc5440
[Frontend] Internalize createDependencyTracker
hamishknight Jun 29, 2020
12ae72c
[Frontend] Move mangling stats to end of pipeline
hamishknight Jun 29, 2020
958bf8e
[Frontend] Move dependency verifier to end of pipeline
hamishknight Jun 29, 2020
4ca6732
[Frontend] NFC: Move dumpAPI up a bit
hamishknight Jun 29, 2020
553dadd
[Frontend] dumpAPI at the end of the pipeline
hamishknight Jun 29, 2020
440cd0b
[docs] Add documentation describing external resources. (#32584)
varungandhi-apple Jun 29, 2020
5cee6f3
Unify 'MetadataSections' data structure, as well as common ELF and CO…
augusto2112 Jun 19, 2020
7c87e1a
Merge pull request #32085 from xymus/spi-isnt-internal-for-real
xymus Jun 29, 2020
73c99ac
[test] Reinstate CoreGraphics↔︎NSValue bridging tests on iOS/watchOS/…
lorentey Jun 23, 2020
65da7f6
Merge pull request #32602 from xedin/rdar-64844584
xedin Jun 30, 2020
b3fb762
[test] Don’t import UIKit on iOS 10.3
lorentey Jun 30, 2020
6fcfbaa
Merge pull request #32523 from buttaface/linker
CodaFi Jun 30, 2020
c579759
[stdlib] Use a direct initializer for typed to raw pointer conversion
lorentey Jun 30, 2020
31a7859
ASTMangler: Fix assertion when mangling invalid identifiers
slavapestov Jun 29, 2020
f8720d5
Sema: Force synthesized conformance to Differentiable in EmittedMembe…
slavapestov Jun 25, 2020
c1b0c93
Sema: Use request evaluator caching for EmittedMembersRequest
slavapestov Jun 25, 2020
055b3a8
Sema: Deterministically order declarations in EmittedMemberRequest
slavapestov Jun 27, 2020
89b2f27
AST: Mark implicit destructor as synthesized to fix non-deterministic…
slavapestov Jun 27, 2020
63bf06d
Add regression test for https://bugs.swift.org/browse/SR-11030 / rdar…
slavapestov Jun 30, 2020
422fd41
Sema: Fix assertion when synthesizing Codable with an IUO stored prop…
slavapestov Jun 29, 2020
9964215
Update status to indicate feature gate
rxwei Jun 30, 2020
4b2fecf
Merge pull request #32611 from slavapestov/codable-iuo-assert
slavapestov Jun 30, 2020
faa06bf
Merge pull request #32581 from slavapestov/cached-emitted-members-req…
slavapestov Jun 30, 2020
ffb59e7
Merge pull request #32610 from slavapestov/regression-test-sr11030
slavapestov Jun 30, 2020
e75562e
Merge pull request #32613 from apple/rxwei-patch-2
swift-ci Jun 30, 2020
ad69927
Merge pull request #32612 from lorentey/unsightlyBitCast
lorentey Jun 30, 2020
4cf4515
Merge pull request #32515 from lorentey/UIKit-NSValueBridging-tests
lorentey Jun 30, 2020
621b3b4
[Diag] Create frontend flags for localization and write tests (#32568)
HassanElDesouky Jun 30, 2020
621cecb
Revert "[Diag] Create frontend flags for localization and write tests…
davezarzycki Jun 30, 2020
6bc0385
Merge pull request #32590 from artemcm/HackingWithCModules
artemcm Jun 30, 2020
c213f19
Merge pull request #32607 from hborla/function-builder-csgen-failure
hborla Jun 30, 2020
1d09970
Merge pull request #32573 from compnerd/aspirational-quotes
compnerd Jun 30, 2020
4f27eee
Merge pull request #32615 from davezarzycki/pr32615
swift-ci Jun 30, 2020
bb3c945
test: exit properly with `swift_build_sdk_interface`
compnerd Jun 25, 2020
cb0a064
tests: make `jobstats` and `process-stats-dir` python3 compatible
compnerd Jun 24, 2020
cfebd57
test: adjust style for python linter (NFC)
compnerd Jun 30, 2020
5c27465
Merge pull request #32601 from hamishknight/not-yet-over-and-out
hamishknight Jun 30, 2020
11246be
Add explicit init from BinaryInteger to CGFloat
stephentyrone Jun 30, 2020
30ccb52
Merge pull request #32572 from rintaro/sourcekit-fast-completionliker…
rintaro Jun 30, 2020
a2758b7
Fix a comment.
DougGregor Jun 24, 2020
1867e0d
[Clang importer] Remove the OS_object objc_runtime_visible hack.
DougGregor Jun 30, 2020
d098595
Merge pull request #32589 from compnerd/cartography
compnerd Jun 30, 2020
59464c3
Merge pull request #32604 from compnerd/statically-moving-forward
compnerd Jun 30, 2020
e832698
Merge pull request #32616 from compnerd/exit-stage-right
compnerd Jun 30, 2020
7d5def9
Merge pull request #32478 from augusto2112/unify_metadata_sections
compnerd Jun 30, 2020
e258bc4
Merge pull request #32537 from 3405691582/StrtoSimplicity
compnerd Jun 30, 2020
f7ee082
test: improve Python3 compatibility for `swift_build_sdk_interfaces`
compnerd Jun 30, 2020
0750b0b
[generics] Add an option that causes the generic specializer to valid…
gottesmm Jun 26, 2020
a86eacc
[sourcekit] Retain semantic annotations across queries
benlangmuir Jun 30, 2020
7f4cd11
Merge pull request #32617 from stephentyrone/rdar-64544503
swift-ci Jun 30, 2020
063e92a
Create frontend flags for localization
HassanElDesouky Jun 30, 2020
42b9b48
update educational notes
OnyekachiSamuel Jun 30, 2020
8ee34b7
Add an else statement
HassanElDesouky Jun 30, 2020
223b5ed
[test] use %diff to fix Windows test
benlangmuir Jun 30, 2020
5f95138
Merge pull request #32626 from compnerd/construction-workers
CodaFi Jun 30, 2020
1bc9159
[AutoDiff] Support differentiation of functions with multiple results…
dan-zheng Jul 1, 2020
7985896
Provide an implementation of init?<T:BinaryInteger>(exactly:T) on eac…
stephentyrone Jul 1, 2020
69c2acf
Loosen a CopyForwarding assert: store instead of deinit.
atrick Jun 30, 2020
4a50e23
Merge pull request #32627 from gottesmm/pr-d8d0aecd8a64d1dd705c2b4412…
gottesmm Jul 1, 2020
38e2998
implement feedback changes
OnyekachiSamuel Jul 1, 2020
71dbe2b
NFC: silence some -Wrange-loop-analysis warnings. (#32634)
dan-zheng Jul 1, 2020
89ae325
Use Formal Access To Compute Override Elision Check
CodaFi Jul 1, 2020
cc622b7
Merge pull request #32625 from atrick/fix-cpf-deinitstore
swift-ci Jul 1, 2020
cddf73e
[Gardening] Clean Up OS-Test Patterns Across The Codebase
CodaFi Jul 1, 2020
50159d1
[Gardening] Use Vendor=apple Where Possible
CodaFi Jul 1, 2020
5d94d3f
[lit] Detect lldb by checking both for lldb_build_root and that that …
gottesmm Jul 1, 2020
8e886ab
Apply -debug-prefix-map to isysroot (#32580)
keith Jul 1, 2020
ba968d4
[stdlib] Fix removeLast(_:) performance for non-random-access collect…
natecook1000 Jul 1, 2020
fe82a70
Merge pull request #32324 from AnthonyLatsis/prespec-oopsie
AnthonyLatsis Jul 1, 2020
0990ffe
Merge pull request #32562 from AnthonyLatsis/stub-filter
AnthonyLatsis Jul 1, 2020
9e85a39
Merge pull request #32630 from HassanElDesouky/LocaleFlagsRE
davezarzycki Jul 1, 2020
fae2c19
NFC: Make SILType.h and SILDeclRef.h not depend on SIL/*.h
davezarzycki Jul 1, 2020
6760555
SIL: a new instruction 'base_addr_for_offset' for field offset calcul…
eeckstein Jul 1, 2020
d7d829c
SILCombine: Constant-fold MemoryLayout<T>.offset(of: \.literalKeyPath)
eeckstein Jun 25, 2020
3f18b5e
[AST] Stop using PointerIntPair for SIL params/results
davezarzycki Jul 1, 2020
b9341c8
[AutoDiff] Fix protocol witness SILGen for `@differentiable` class me…
dan-zheng Jul 1, 2020
46a315e
Merge pull request #32645 from davezarzycki/pr32645
davezarzycki Jul 1, 2020
3e59cc4
Merge pull request #32646 from davezarzycki/pr32646
davezarzycki Jul 1, 2020
d0a7948
Merge pull request #32544 from eeckstein/fold-kp-offset
eeckstein Jul 1, 2020
211bd71
SIL: increase the module version number
eeckstein Jul 1, 2020
d5a549a
NFC: silence some -Wrange-loop-analysis warnings. (#32635)
dan-zheng Jul 1, 2020
fa71582
[IRGen] Assert the SourceFile has been type-checked
hamishknight Jul 1, 2020
c65246f
Merge the IRGen requests
hamishknight Jul 1, 2020
bf2f4af
NFC: Move NumThreads from SILOptions to IRGenOptions
hamishknight Jul 1, 2020
d2bf447
Revert "ModuleLoader: refactor computePrebuiltModulePath to facilitat…
nkcsgexi Jun 30, 2020
35eab3e
Merge pull request #32628 from benlangmuir/sema-repeat
benlangmuir Jul 1, 2020
b9e600b
test: make `round-trip-syntax-test` Python 3 friendly
compnerd Jun 24, 2020
14f72b7
test: appease python linter (NFC)
compnerd Jul 1, 2020
337c4e8
Add a new -sil-disable-only-function flag (#32622)
meg-gupta Jul 1, 2020
d285123
[build] Pass target to linker for host tools for Apple SDKs (#32618)
edymtt Jul 1, 2020
2e85347
Merge pull request #32643 from gottesmm/pr-aa6d8ea8a6a7c33cd050eaa2e5…
gottesmm Jul 1, 2020
62ebcae
Merge pull request #32596 from mikeash/remotemirror-null-convertchild
mikeash Jul 1, 2020
e74e914
Merge pull request #32651 from eeckstein/module-version
swift-ci Jul 1, 2020
84dd4db
Dependencies Scanner: report compiled Swift module paths if they are …
nkcsgexi Jun 30, 2020
b766544
Merge pull request #32642 from CodaFi/ossignpost
CodaFi Jul 1, 2020
5a8fdaf
Merge pull request #32638 from CodaFi/let-it-override
CodaFi Jul 1, 2020
723a205
Revert "SILCombine: Constant-fold MemoryLayout<T>.offset(of: \.litera…
eeckstein Jul 1, 2020
93df7f4
PathSanitizingFileCheck: improve Python3 compatibility
compnerd Jun 29, 2020
96127ca
Update round-trip-syntax-test
compnerd Jul 1, 2020
c03ea7a
Merge pull request #32546 from dylansturg/add_swift_format_product
benlangmuir Jul 1, 2020
890df57
Merge pull request #32654 from hamishknight/all-for-ir-and-ir-for-all
hamishknight Jul 1, 2020
906b3cb
Add -sil-inline-never-function flag (#32660)
meg-gupta Jul 1, 2020
a7679c0
[test] Add OpenBSD to stable ABI testing targets.
3405691582 Mar 23, 2020
3da8595
Merge pull request #32664 from eeckstein/revert-offsetof-opt
swift-ci Jul 1, 2020
cacfb01
Revert subset of "[Gardening] Clean Up OS-Test Patterns Across The Co…
varungandhi-apple Jul 1, 2020
50142f8
AST: address code review comments on isEquivalentToExtendedContext()
nkcsgexi Jul 1, 2020
3e8166e
Merge pull request #32633 from nkcsgexi/build-forward-module-from-com…
nkcsgexi Jul 2, 2020
ff26a06
fix broken test
OnyekachiSamuel Jul 2, 2020
844ab50
AST: Add more asserts for same-type constraints in generic signatures
slavapestov Jul 1, 2020
665eb51
Merge pull request #32667 from nkcsgexi/comments-on-64538537-5.3
nkcsgexi Jul 2, 2020
fbec91a
[Autodiff] Derivative Registration for the Get and Set Accessors (#32…
Jul 2, 2020
c69baa8
[EduNotes] Explain some opaque type diagnostics
owenv Jun 7, 2020
ed1dc0f
Merge pull request #32620 from DougGregor/remove-os-object-hack
DougGregor Jul 2, 2020
7b89eae
AST: Remove unused ArchetypeType::getAllNestedTypes() method
slavapestov Jul 2, 2020
a091d4f
Merge pull request #32666 from slavapestov/same-type-requirement-assert
slavapestov Jul 2, 2020
9defc0a
[AutoDiff] NFC: silence no-asserts unused variable warnings. (#32675)
dan-zheng Jul 2, 2020
a08f421
fix failing tests
OnyekachiSamuel Jul 2, 2020
1992579
Merge pull request #32674 from slavapestov/remove-archetype-get-all-n…
slavapestov Jul 2, 2020
49d4893
Remove BooleanType from docs/StdlibRationales.rst
benrimmington Jul 2, 2020
3952715
[SIL] NFC: Move #include of CanTypeVisitor.h
davezarzycki Jul 2, 2020
f1bba3e
Disable a RUN line in osx-targets.swift
hyp Jul 2, 2020
0b6a21b
[SIL] NFC: Add more paranoia checks to SILType
davezarzycki Jul 2, 2020
0f036e5
Merge pull request #32653 from compnerd/hand-sanitizer-keeps-the-coro…
compnerd Jul 2, 2020
5f219cd
Front-end: disable interface file locking for the -compile-module-fro…
nkcsgexi Jul 2, 2020
ed0e628
Merge pull request #32679 from apple/disable-osx-targets-swift-run-line
hyp Jul 2, 2020
e8150f2
Merge pull request #32681 from nkcsgexi/65005528
nkcsgexi Jul 2, 2020
d87e7c8
Merge pull request #32648 from compnerd/are-we-there-yet
compnerd Jul 2, 2020
3ed6c99
test: make `validate_parse` more python3 friendly
compnerd Jul 2, 2020
406fb23
test: `iteritems` -> `items`
compnerd Jul 2, 2020
b871528
Merge pull request #32524 from OnyekachiSamuel/fix-confusing-protocol…
hborla Jul 2, 2020
f989aa2
SR-12486: `T.self is Any.Protocol` is broken (#31662)
tbkka Jul 2, 2020
23e7974
[CS] Avoid checking RHS of one-way constraint for reactivation
hamishknight Jul 2, 2020
732698e
Fix symbol visibility test for CentOS 7
drexin Jul 2, 2020
62eab29
Merge pull request #32669 from varungandhi-apple/vg-use-os-checks-in-…
CodaFi Jul 2, 2020
e02438c
test: repair the Windows builders after #32666
compnerd Jul 2, 2020
e80b188
[build] Add LTO flag to link options (#32683)
edymtt Jul 2, 2020
4b14487
[NFC] [cxx-interop] Add SILGen tests for synthesized initializers.
zoecarver Jul 1, 2020
dd26811
Merge pull request #32689 from compnerd/iterative-improvements
compnerd Jul 2, 2020
c894511
[Apple Silicon] Add arm64 macOS support to benchmark suite
shahmishal Jul 2, 2020
ff547e7
[Apple Silicon][Test] Enable testing for arm64 macOS
shahmishal Jul 2, 2020
84489d8
[Apple Silicon] Mark several tests that require the Swift interpreter…
shahmishal Jul 2, 2020
92ca9fc
[Apple Silicon] Generalize tests for other macOS architectures
shahmishal Jul 2, 2020
1899d2c
[Apple Silicon] Mark macOS tests that require x86_64
shahmishal Jul 2, 2020
51f92e8
Merge pull request #32691 from drexin/wip-fix-symbol-visibility-test
drexin Jul 2, 2020
919da26
[Apple Silicon] [Build] Generalize macOS architecture check
shahmishal Jul 2, 2020
4c97d0c
[Apple Silicon] [ObjectiveC Overlay] ObjCBool is C _Bool on arm64 macOS.
shahmishal Jul 2, 2020
134f202
[Apple Silicon] Baseline arm64 macOS at Swift 5.3 / macOS 10.16
shahmishal Jul 2, 2020
f88fd50
Merge pull request #32694 from compnerd/32666
compnerd Jul 3, 2020
efe5907
[Apple Silicon] [Test] Fix various IRGen tests for arm64 macOS
shahmishal Jul 3, 2020
02b7403
[Apple Silicon] [Test] Generalize api-digester tests for Apple Silico…
shahmishal Jul 3, 2020
ee1ea6e
[Apple Silicon] Support building for macOS arm64/arm64e
shahmishal Jul 3, 2020
28fb66c
[SR-13088] Fix false positive downcast unrelated of types that cannot…
LucianoPAlmeida Jul 3, 2020
960f6ce
[Apple Silicon] [build-script] Support stdlib macOS arm64/arm64e
shahmishal Jul 3, 2020
37f7848
[Apple Silicon] Use SWIFT_CROSS_COMPILING to use build-time tools (tb…
shahmishal Jul 3, 2020
587ce88
[Apple Silicon] Don't set native llvm tools path when cross compiling…
shahmishal Jul 3, 2020
75a24ca
Merge pull request #32673 from hamishknight/one-time-activation
hamishknight Jul 3, 2020
91a1dc4
[Apple Silicon] [build-script] Build compiler-rt even when cross-comp…
shahmishal Jul 3, 2020
24a48ef
[Apple Silicon] [build-script] Fix cross-compile check.
shahmishal Jul 3, 2020
5218470
[Apple Silicon] Build system configuration to support arm64 macOS
shahmishal Jul 3, 2020
7009e2e
[Apple Silicon] [build-script] Fix lipo step invocation with --no-leg…
shahmishal Jul 3, 2020
2aef2c5
[Apple Silicon] Fix cross-compilation in Xcode trains where we're not…
shahmishal Jul 3, 2020
24e8e32
[Apple Silicon] [Platform] Default arm64 macOS and arm64 simulators t…
shahmishal Jul 3, 2020
0c2617f
[Apple Silicon] [IRGen] Fix test for arm64 macOS
shahmishal Jul 3, 2020
3c9e72f
[Apple Silicon] [macCatalyst] Baseline arm64(e) macCatalyst at Swift …
shahmishal Jul 3, 2020
a8aec14
[Apple Silicon] Adjust linking deployment target from 11.0 down to 10…
shahmishal Jul 3, 2020
6336b14
[Apple Silicon] [In-process memory reader] Adjust low-bits computatio…
shahmishal Jul 3, 2020
83c57f3
[Apple Silicon] [Build] Filter out any architectures that are unsuppo…
shahmishal Jul 3, 2020
76fe814
[Apple Silicon] [Test] Fix a few tests for SDK differences
shahmishal Jul 3, 2020
40d0024
[Apple Silicon] [Test] Remove explicitly-specified target.
shahmishal Jul 3, 2020
a930b51
[Apple Silicon] Simulator support for arm64
shahmishal Jul 3, 2020
710ba14
[Apple Silicon] [Platform] Baseline arm64 simulators at iOS/tvOS 14.0…
shahmishal Jul 3, 2020
194d5d0
[Apple Silicon] Use a correct isa mask on Apple Silicon without signe…
shahmishal Jul 3, 2020
0c07365
[Apple Silicon] Fix the availability for Swift 5.3 version
shahmishal Jul 3, 2020
60d996f
[Apple Silicon] Add support for triple and availability canonicalization
shahmishal Jul 3, 2020
10dda58
[Apple Silicon] Update tests for no macOS target triple canonicalization
shahmishal Jul 3, 2020
22289b0
Merge pull request #32231 from owenv/opaque-note
owenv Jul 3, 2020
45b3aa0
Merge pull request #32668 from 3405691582/OpenBSD_MandatesStableAPI
CodaFi Jul 3, 2020
899925a
[Apple Silicon] Remove tvOS/watchOS simulator from Driver/linker test
shahmishal Jul 3, 2020
26358c4
Import member operator functions as static members (#32293)
MForster Jul 3, 2020
a443327
Add bug reference to XFAIL operator tests
MForster Jul 3, 2020
8a5ae9d
Merge pull request #32678 from davezarzycki/pr32678
davezarzycki Jul 3, 2020
5de9eff
Merge pull request #32680 from davezarzycki/pr32679
davezarzycki Jul 3, 2020
1b97c03
[ownership] Loosen restrictions around what we specialize and add gen…
gottesmm Jun 10, 2020
5f6f46f
Merge pull request #32699 from MForster/m/op/bug-reference
swift-ci Jul 3, 2020
1f9da38
Update README for new target names
Jumhyn Jul 3, 2020
79913b9
Don't "finalize" the empty-array singleton.
eeckstein Jul 3, 2020
bc27356
stdlib: enable runtime checking for COW support by default in assert …
eeckstein Jun 15, 2020
1a0c4d0
Reinstate "SILCombine: Constant-fold MemoryLayout<T>.offset(of: \.lit…
eeckstein Jul 3, 2020
6ebd2a7
Merge pull request #32658 from zoecarver/cxx/test/no-arg-const
swift-ci Jul 3, 2020
b85ffd3
Merge pull request #32385 from eeckstein/enable-cow-runtime-checks
eeckstein Jul 3, 2020
58d0cbc
Update validate_parse.py
compnerd Jul 3, 2020
7332619
Remove `ninja compiler` command
Jumhyn Jul 3, 2020
0d44dad
Merge pull request #32677 from benrimmington/se-0109-remove-boolean
swift-ci Jul 3, 2020
4a49a26
Merge pull request #32703 from eeckstein/fold-kp-offset2
eeckstein Jul 4, 2020
d6deb37
Merge pull request #32701 from Jumhyn/update-readme-7320
swift-ci Jul 4, 2020
a94df37
Merge pull request #32688 from compnerd/validation
compnerd Jul 4, 2020
8a1f2c6
Merge pull request #32397 from gottesmm/pr-92e92ba00c4c145dbd65043094…
gottesmm Jul 4, 2020
3072429
[Apple Silicon] Update the comment in AvailabilitySpec.h
shahmishal Jul 5, 2020
6ef029d
[Apple Silicon] Update the comment in lib/AST/PlatformKind.cpp
shahmishal Jul 5, 2020
bee7ba2
[Apple Silicon] Update the comment in lib/Parse/ParseExpr.cpp
shahmishal Jul 5, 2020
ca87af1
Merge pull request #32705 from apple/apple-silicon-master
shahmishal Jul 5, 2020
d4bbcf9
[AutoDiff] Fix unexpected non-differentiable property access error. (…
dan-zheng Jul 5, 2020
7b54e8b
[TBDGen] NFC: print duplicate symbol name before assertion. (#32649)
dan-zheng Jul 5, 2020
c07b3b0
NFC: add operator<< for SubstitutionMap. (#32637)
dan-zheng Jul 5, 2020
9c20198
[AutoDiff] Disallow differentiation of opaque-result-typed functions.…
dan-zheng Jul 6, 2020
c7cd497
[AutoDiff] Improve `@derivative` and `@transpose` diagnostics. (#32717)
dan-zheng Jul 6, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 6 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,12 @@ if(SWIFT_PATH_TO_CMARK_BUILD)
endif()
message(STATUS "")

if("${SWIFT_NATIVE_LLVM_TOOLS_PATH}" STREQUAL "")
set(SWIFT_CROSS_COMPILING FALSE)
else()
set(SWIFT_CROSS_COMPILING TRUE)
endif()

include(SwiftSharedCMakeConfig)

# NOTE: We include this before SwiftComponents as it relies on some LLVM CMake
Expand Down Expand Up @@ -487,16 +493,6 @@ if(NOT SWIFT_LIPO)
find_toolchain_tool(SWIFT_LIPO "${SWIFT_DARWIN_XCRUN_TOOLCHAIN}" lipo)
endif()

# Reset CMAKE_SYSTEM_PROCESSOR if not cross-compiling.
# CMake refuses to use `uname -m` on OS X
# http://public.kitware.com/Bug/view.php?id=10326
if(NOT CMAKE_CROSSCOMPILING AND CMAKE_SYSTEM_PROCESSOR STREQUAL "i386")
execute_process(
COMMAND "uname" "-m"
OUTPUT_VARIABLE CMAKE_SYSTEM_PROCESSOR
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()

get_filename_component(SWIFT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} REALPATH)
set(SWIFT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
set(SWIFT_CMAKE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Please make sure you use Python 2.x. Python 3.x is not supported currently.

#### macOS

To build for macOS, you need [Xcode 11.4](https://developer.apple.com/xcode/resources/).
To build for macOS, you need [Xcode 12 beta](https://developer.apple.com/xcode/resources/).
The required version of Xcode changes frequently, and is often a beta release.
Check this document or the host information on <https://ci.swift.org> for the
current required version.
Expand Down Expand Up @@ -241,7 +241,7 @@ various products. These incremental builds are a big timesaver when developing
and debugging.

cd ${SWIFT_BUILD_DIR}
ninja swift
ninja swift-frontend

This will build the Swift compiler, but will not rebuild the standard library or
any other target. Building the `swift-stdlib` target as an additional layer of
Expand All @@ -258,7 +258,7 @@ To open the Swift project in Xcode, open `${SWIFT_BUILD_DIR}/Swift.xcodeproj`.
It will auto-create a *lot* of schemes for all of the available targets. A
common debug flow would involve:

- Select the 'swift' scheme.
- Select the 'swift-frontend' scheme.
- Pull up the scheme editor (⌘⇧<).
- Select the 'Arguments' tab and click the '+'.
- Add the command line options.
Expand Down
13 changes: 6 additions & 7 deletions benchmark/cmake/modules/AddSwiftBenchmarkSuite.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ macro(configure_build)
endmacro()

macro(configure_sdks_darwin)
set(macosx_arch "x86_64")
set(macosx_arch "x86_64" "arm64")
set(iphoneos_arch "arm64" "arm64e" "armv7")
set(appletvos_arch "arm64")
set(watchos_arch "armv7k")
Expand Down Expand Up @@ -609,11 +609,7 @@ function (swift_benchmark_compile_archopts)

if(is_darwin)
# If host == target.
if("${BENCH_COMPILE_ARCHOPTS_PLATFORM}" STREQUAL "macosx")
set(OUTPUT_EXEC "${benchmark-bin-dir}/Benchmark_${BENCH_COMPILE_ARCHOPTS_OPT}")
else()
set(OUTPUT_EXEC "${benchmark-bin-dir}/Benchmark_${BENCH_COMPILE_ARCHOPTS_OPT}-${target}")
endif()
set(OUTPUT_EXEC "${benchmark-bin-dir}/Benchmark_${BENCH_COMPILE_ARCHOPTS_OPT}-${target}")
else()
# If we are on Linux, we do not support cross compiling.
set(OUTPUT_EXEC "${benchmark-bin-dir}/Benchmark_${BENCH_COMPILE_ARCHOPTS_OPT}")
Expand Down Expand Up @@ -660,8 +656,11 @@ function (swift_benchmark_compile_archopts)
"-m${triple_platform}-version-min=${ver}"
"-lobjc"
"-L${SWIFT_LIBRARY_PATH}/${BENCH_COMPILE_ARCHOPTS_PLATFORM}"
"-L${sdk}/usr/lib/swift"
"-Xlinker" "-rpath"
"-Xlinker" "${SWIFT_LINK_RPATH}"
"-Xlinker" "-rpath"
"-Xlinker" "/usr/lib/swift"
${bench_library_objects}
${bench_driver_objects}
${ld64_add_ast_path_opts}
Expand Down Expand Up @@ -694,7 +693,7 @@ function(swift_benchmark_compile)
cmake_parse_arguments(SWIFT_BENCHMARK_COMPILE "" "PLATFORM" "" ${ARGN})

if(NOT SWIFT_BENCHMARK_BUILT_STANDALONE)
set(stdlib_dependencies "swift")
set(stdlib_dependencies "swift-frontend")
foreach(stdlib_dependency ${UNIVERSAL_LIBRARY_NAMES_${SWIFT_BENCHMARK_COMPILE_PLATFORM}})
string(FIND "${stdlib_dependency}" "Unittest" find_output)
if("${find_output}" STREQUAL "-1")
Expand Down
4 changes: 2 additions & 2 deletions benchmark/single-source/FloatingPointParsing.swift
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ public func run_ParseDoubleExp(_ N: Int) {

@inline(never)
public func run_ParseFloat80Exp(_ N: Int) {
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) || os(Linux)
#if canImport(Darwin) || os(Linux)
// On Darwin, long double is Float80 on x86, and Double otherwise.
// On Linux, Float80 is at aleast available on x86.
#if arch(x86_64) || arch(i386)
Expand All @@ -263,7 +263,7 @@ public func run_ParseDoubleUniform(_ N: Int) {

@inline(never)
public func run_ParseFloat80Uniform(_ N: Int) {
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) || os(Linux)
#if canImport(Darwin) || os(Linux)
// On Darwin, long double is Float80 on x86, and Double otherwise.
// On Linux, Float80 is at aleast available on x86.
#if arch(x86_64) || arch(i386)
Expand Down
6 changes: 3 additions & 3 deletions benchmark/single-source/FloatingPointPrinting.swift
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public func run_FloatingPointPrinting_Double_description_small(_ N: Int) {

@inline(never)
public func run_FloatingPointPrinting_Float80_description_small(_ N: Int) {
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) || os(Linux)
#if canImport(Darwin) || os(Linux)
// On Darwin, long double is Float80 on x86, and Double otherwise.
// On Linux, Float80 is at aleast available on x86.
#if arch(x86_64) || arch(i386)
Expand Down Expand Up @@ -152,7 +152,7 @@ public func run_FloatingPointPrinting_Double_description_uniform(_ N: Int) {

@inline(never)
public func run_FloatingPointPrinting_Float80_description_uniform(_ N: Int) {
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) || os(Linux)
#if canImport(Darwin) || os(Linux)
// On Darwin, long double is Float80 on x86, and Double otherwise.
// On Linux, Float80 is at aleast available on x86.
#if arch(x86_64) || arch(i386)
Expand Down Expand Up @@ -202,7 +202,7 @@ public func run_FloatingPointPrinting_Double_interpolated(_ N: Int) {

@inline(never)
public func run_FloatingPointPrinting_Float80_interpolated(_ N: Int) {
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) || os(Linux)
#if canImport(Darwin) || os(Linux)
// On Darwin, long double is Float80 on x86, and Double otherwise.
// On Linux, Float80 is at aleast available on x86.
#if arch(x86_64) || arch(i386)
Expand Down
2 changes: 1 addition & 1 deletion benchmark/single-source/NSStringConversion.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
//===----------------------------------------------------------------------===//

// <rdar://problem/19003201>
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS)
#if canImport(Darwin)

import TestsUtils
import Foundation
Expand Down
22 changes: 22 additions & 0 deletions benchmark/single-source/Substring.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ public let SubstringTest = [
BenchmarkInfo(name: "EqualSubstringString", runFunction: run_EqualSubstringString, tags: [.validation, .api, .String]),
BenchmarkInfo(name: "EqualSubstringSubstring", runFunction: run_EqualSubstringSubstring, tags: [.validation, .api, .String]),
BenchmarkInfo(name: "EqualSubstringSubstringGenericEquatable", runFunction: run_EqualSubstringSubstringGenericEquatable, tags: [.validation, .api, .String]),
BenchmarkInfo(name: "SubstringRemoveFirst1", runFunction: run_SubstringRemoveFirst1, tags: [.validation, .api, .String]),
BenchmarkInfo(name: "SubstringRemoveLast1", runFunction: run_SubstringRemoveLast1, tags: [.validation, .api, .String]),
BenchmarkInfo(name: "LessSubstringSubstring", runFunction: run_LessSubstringSubstring, tags: [.validation, .api, .String]),
BenchmarkInfo(name: "LessSubstringSubstringGenericComparable", runFunction: run_LessSubstringSubstringGenericComparable, tags: [.validation, .api, .String]),
BenchmarkInfo(name: "StringFromLongWholeSubstring", runFunction: run_StringFromLongWholeSubstring, tags: [.validation, .api, .String]),
Expand All @@ -34,6 +36,8 @@ let longWide = "fὢasὢodὢijὢadὢolὢsjὢalὢsdὢjlὢasὢdfὢijὢ
let (s1, ss1) = equivalentWithDistinctBuffers()
let (s2, ss2) = equivalentWithDistinctBuffers()

let quiteLong = String(repeating: "0", count: 10_000)[...]

@inline(never)
public func run_SubstringFromLongString(_ N: Int) {
var s = longWide
Expand Down Expand Up @@ -126,6 +130,24 @@ public func run_EqualSubstringSubstringGenericEquatable(_ N: Int) {
}
}

@inline(never)
public func run_SubstringRemoveFirst1(_ N: Int) {
for _ in 1...N {
var s = quiteLong
s.removeFirst(1)
blackHole(s.first == "0")
}
}

@inline(never)
public func run_SubstringRemoveLast1(_ N: Int) {
for _ in 1...N {
var s = quiteLong
s.removeLast(1)
blackHole(s.first == "0")
}
}

/*
func checkEqual<T, U>(_ x: T, _ y: U)
where T : StringProtocol, U : StringProtocol {
Expand Down
8 changes: 4 additions & 4 deletions benchmark/utils/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@ import NibbleSort
import NIOChannelPipeline
import NSDictionaryCastToSwift
import NSError
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS)
#if canImport(Darwin)
import NSStringConversion
#endif
import NopDeinit
import ObjectAllocation
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS)
#if canImport(Darwin)
import ObjectiveCBridging
import ObjectiveCBridgingStubs
#if !(SWIFT_PACKAGE || Xcode)
Expand Down Expand Up @@ -287,14 +287,14 @@ registerBenchmark(MonteCarloE)
registerBenchmark(MonteCarloPi)
registerBenchmark(NSDictionaryCastToSwift)
registerBenchmark(NSErrorTest)
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS)
#if canImport(Darwin)
registerBenchmark(NSStringConversion)
#endif
registerBenchmark(NibbleSort)
registerBenchmark(NIOChannelPipeline)
registerBenchmark(NopDeinit)
registerBenchmark(ObjectAllocation)
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS)
#if canImport(Darwin)
registerBenchmark(ObjectiveCBridging)
registerBenchmark(ObjectiveCBridgingStubs)
#if !(SWIFT_PACKAGE || Xcode)
Expand Down
11 changes: 5 additions & 6 deletions cmake/modules/AddSwift.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function(_swift_gyb_target_sources target scope)

add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${generated}
COMMAND
$<TARGET_FILE:Python2::Interpreter> ${SWIFT_SOURCE_DIR}/utils/gyb -D CMAKE_SIZEOF_VOID_P=${CMAKE_SIZEOF_VOID_P} ${SWIFT_GYB_FLAGS} -o ${CMAKE_CURRENT_BINARY_DIR}/${generated}.tmp ${absolute}
$<TARGET_FILE:Python3::Interpreter> ${SWIFT_SOURCE_DIR}/utils/gyb -D CMAKE_SIZEOF_VOID_P=${CMAKE_SIZEOF_VOID_P} ${SWIFT_GYB_FLAGS} -o ${CMAKE_CURRENT_BINARY_DIR}/${generated}.tmp ${absolute}
COMMAND
${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/${generated}.tmp ${CMAKE_CURRENT_BINARY_DIR}/${generated}
COMMAND
Expand Down Expand Up @@ -88,6 +88,7 @@ function(_add_host_variant_c_compile_link_flags name)
MACCATALYST_BUILD_FLAVOR ""
DEPLOYMENT_VERSION "${DEPLOYMENT_VERSION}")
target_compile_options(${name} PRIVATE -target;${target})
target_link_options(${name} PRIVATE -target;${target})
endif()

set(_sysroot
Expand Down Expand Up @@ -120,6 +121,7 @@ function(_add_host_variant_c_compile_link_flags name)
_compute_lto_flag("${SWIFT_TOOLS_ENABLE_LTO}" _lto_flag_out)
if (_lto_flag_out)
target_compile_options(${name} PRIVATE ${_lto_flag_out})
target_link_options(${name} PRIVATE ${_lto_flag_out})
endif()
endfunction()

Expand Down Expand Up @@ -470,6 +472,7 @@ function(add_swift_host_library name)

_add_host_variant_c_compile_flags(${name})
_add_host_variant_link_flags(${name})
_add_host_variant_c_compile_link_flags(${name})
_set_target_prefix_and_suffix(${name} "${libkind}" "${SWIFT_HOST_VARIANT_SDK}")

# Set compilation and link flags.
Expand Down Expand Up @@ -526,11 +529,6 @@ function(add_swift_host_library name)
target_link_options(${name} PRIVATE
"LINKER:-current_version,${SWIFT_COMPILER_VERSION}")
endif()

get_target_triple(target target_variant "${SWIFT_HOST_VARIANT_SDK}" "${SWIFT_HOST_VARIANT_ARCH}"
MACCATALYST_BUILD_FLAVOR ""
DEPLOYMENT_VERSION "${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_DEPLOYMENT_VERSION}")
target_link_options(${name} PRIVATE -target;${target})
endif()

add_dependencies(dev ${name})
Expand Down Expand Up @@ -575,6 +573,7 @@ function(add_swift_host_tool executable)
add_executable(${executable} ${ASHT_UNPARSED_ARGUMENTS})
_add_host_variant_c_compile_flags(${executable})
_add_host_variant_link_flags(${executable})
_add_host_variant_c_compile_link_flags(${executable})
target_link_directories(${executable} PRIVATE
${SWIFTLIB_DIR}/${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_LIB_SUBDIR})
add_dependencies(${executable} ${LLVM_COMMON_DEPENDS})
Expand Down
8 changes: 5 additions & 3 deletions cmake/modules/AddSwiftUnittests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,11 @@ function(add_swift_unittest test_dirname)
_ENABLE_EXTENDED_ALIGNED_STORAGE)
endif()

if(SWIFT_USE_LINKER)
set_property(TARGET "${test_dirname}" APPEND_STRING PROPERTY
LINK_FLAGS " -fuse-ld=${SWIFT_USE_LINKER}")
if(NOT SWIFT_COMPILER_IS_MSVC_LIKE)
if(SWIFT_USE_LINKER)
target_link_options(${test_dirname} PRIVATE
-fuse-ld=${SWIFT_USE_LINKER}$<$<STREQUAL:${CMAKE_HOST_SYSTEM_NAME},Windows>:.exe>)
endif()
endif()

if(SWIFT_ANALYZE_CODE_COVERAGE)
Expand Down
27 changes: 22 additions & 5 deletions cmake/modules/DarwinSDKs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,34 @@ option(SWIFT_ENABLE_IOS32

if(SWIFT_ENABLE_IOS32)
set(SUPPORTED_IOS_ARCHS "armv7;armv7s;arm64;arm64e")
set(SUPPORTED_IOS_SIMULATOR_ARCHS "i386;x86_64")
set(SUPPORTED_IOS_SIMULATOR_ARCHS "i386;x86_64;arm64")
else()
set(SUPPORTED_IOS_ARCHS "arm64;arm64e")
set(SUPPORTED_IOS_SIMULATOR_ARCHS "x86_64")
set(SUPPORTED_IOS_SIMULATOR_ARCHS "x86_64;arm64")
endif()

set(SUPPORTED_TVOS_ARCHS "arm64")
set(SUPPORTED_TVOS_SIMULATOR_ARCHS "x86_64")
set(SUPPORTED_TVOS_SIMULATOR_ARCHS "x86_64;arm64")
set(SUPPORTED_WATCHOS_ARCHS "armv7k")
set(SUPPORTED_WATCHOS_SIMULATOR_ARCHS "i386")
set(SUPPORTED_OSX_ARCHS "x86_64")
set(SUPPORTED_WATCHOS_SIMULATOR_ARCHS "i386;arm64")
set(SUPPORTED_OSX_ARCHS "x86_64;arm64;arm64e")

# Get the SDK version from SDKSettings.
execute_process(
COMMAND "defaults" "read" "${CMAKE_OSX_SYSROOT}/SDKSettings.plist" "Version"
OUTPUT_VARIABLE SWIFT_OSX_SDK_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE)

# Remove the last component, if any. e.g. 10.15.26 -> 10.15
string(REGEX REPLACE "\([0-9]*[.][0-9]*\)[.][0-9]*" "\\1"
SWIFT_OSX_SDK_VERSION "${SWIFT_OSX_SDK_VERSION}")

if (${SWIFT_OSX_SDK_VERSION} STREQUAL "10.14" OR
${SWIFT_OSX_SDK_VERSION} STREQUAL "10.15")
set(SUPPORTED_OSX_ARCHS "x86_64")
else()
set(SUPPORTED_OSX_ARCHS "x86_64;arm64e")
endif()

is_sdk_requested(OSX swift_build_osx)
if(swift_build_osx)
Expand Down
35 changes: 35 additions & 0 deletions cmake/modules/SwiftConfigureSDK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,38 @@ function(_report_sdk prefix)
message(STATUS "")
endfunction()

# Remove architectures not supported by the SDK from the given list.
function(remove_sdk_unsupported_archs name os sdk_path architectures_var)
execute_process(COMMAND
/usr/libexec/PlistBuddy -c "Print :SupportedTargets:${os}:Archs" ${sdk_path}/SDKSettings.plist
OUTPUT_VARIABLE sdk_supported_archs
RESULT_VARIABLE plist_error)

if (NOT plist_error EQUAL 0)
message(STATUS "${os} SDK at ${sdk_path} does not publish its supported architectures")
return()
endif()

set(architectures)
foreach(arch ${${architectures_var}})
if(sdk_supported_archs MATCHES "${arch}\n")
list(APPEND architectures ${arch})
elseif(arch MATCHES "^armv7(s)?$" AND os STREQUAL "iphoneos")
# 32-bit iOS is not listed explicitly in SDK settings.
message(STATUS "Assuming ${name} SDK at ${sdk_path} supports architecture ${arch}")
list(APPEND architectures ${arch})
elseif(arch STREQUAL "i386" AND os STREQUAL "iphonesimulator")
# 32-bit iOS simulatoris not listed explicitly in SDK settings.
message(STATUS "Assuming ${name} SDK at ${sdk_path} supports architecture ${arch}")
list(APPEND architectures ${arch})
else()
message(STATUS "${name} SDK at ${sdk_path} does not support architecture ${arch}")
endif()
endforeach()

set("${architectures_var}" ${architectures} PARENT_SCOPE)
endfunction()

# Configure an SDK
#
# Usage:
Expand Down Expand Up @@ -164,6 +196,9 @@ macro(configure_sdk_darwin
SWIFT_SDK_${prefix}_ARCHITECTURES) # result
endif()

# Remove any architectures not supported by the SDK.
remove_sdk_unsupported_archs(${name} ${xcrun_name} ${SWIFT_SDK_${prefix}_PATH} SWIFT_SDK_${prefix}_ARCHITECTURES)

list_intersect(
"${SWIFT_DARWIN_MODULE_ARCHS}" # lhs
"${architectures}" # rhs
Expand Down
Loading