forked from swiftlang/swift
-
Notifications
You must be signed in to change notification settings - Fork 30
[pull] swiftwasm from main #3936
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…riables that are also under #ifndef NDEBUG
…c_Static. The shared arguments should come first, followed by the headers. Otherwise, things don't work correctly, and CMake thinks there are no sources in sourcekitdInProc_Static. This is for <rdar://problem/85511244>.
This setting is set early in SourceKit's CMake logic to match Swift's CMake settings. However, it was then reset back to the empty string. The CMake logic would then see that it was unset and use the host OS as the deployment target. Thankfully, the compiled binaries have been correct without this change, but sourcekitd.framework's Info.plist when building for iOS was incorrect. By removing the reset, the correct value propagates to the right places. This is for <rdar://problem/85511244> and addresses <rdar://problem/68656762>.
These builds are meant to be as close to Xcode train builds as possible, so it makes sense to treat them this way instead of letting them be treated as OS builds or making a new kind of B&I build for them. Playgrounds trains are identifiable via the `RC_PLAYGROUNDS` environment variable being set to `YES`; if that isn't set, then it's not a Playgrounds train. This addresses <rdar://problem/85511438>.
Ignore errors when emitting/reading a PCM/PCH and Clang has `-fallow-(pcm|pch)-with-compiler-errors` set. Resolves rdar://85576570.
While this will be in the compiler arguments, it's easy to miss when skimming over the pretty stacktrace. Add an explicit message to make it easier to see while looking over crashes.
…aling"" This reverts commit 7c7dd66.
This fixes several issues with the original Scalar Type Layouts patch: - AddressOnly types need to be lowered to ScalarKinds that do not load when releasing. - ClassExistentials now handle the case when the existential is an inline aggregation of the class pointer and witness table pointers
… asserts When running in assert mode make it an error for a public module to publicly import a private module.
occuring -> occurring
This ensures, among other things, that `@_predatesConcurrency` doesn't affect the types of entities anywhere in a module compiled in Swift 6, so we get stricter checking throughout.
Don't treat "unsafe" and safe global actor isolation differently with respect to dynamic data race detection, because this `@_predatesConcurrency` is only supposed to affect the interface (not the implementation).
This fixes an issue reported with emit-module-separately where the compiler reports false-errors on availability. rdar://85472278
…non-resilient modules This change was originally introduced in swiftlang#36752. The problem occurs in the following scenario: - New compiler with this change is used to build a dylib and swiftinterface file for module A, which defines a RawRepresentable enum type E. - Module B imports module A and references == on two E instances. - The module B is run against a dylib of module A built with the old compiler. At this point, module B will not link (or run) because the symbol for E.== is not present in the old dylib for A. The only real solution here is to disable this new optimization when building a module for -enable-library-evolution, unfortunately. In the future, we could make the derived E.== symbol @_alwaysEmitIntoClient. However today, synthesized declarations cannot be @_alwaysEmitIntoClient because they do not have source text that can be emitted into the swiftinterface file. One day, we might gain the ability to print Exprs as source text that parses back in, at which point we could allow synthesized declarations to be @_alwaysEmitIntoClient. Fixes rdar://problem/84912735 and rdar://problem/82919247.
This attribute is no more needed as we now fast-track accepting all Objective-C SPIs at access control. rdar://85617355
…, behind the SWIFT_STDLIB_STATIC_PRINT flag
Improve the equality check for actor isolation to prevent differences between "unsafe" global actor and global actor isolation from causing inequality. The operation here is about conceptual equality, not precise storage semantics. This allows us to simplify override isolation checking and, likely, other places I haven't seen yet.
This downgrades some errors to warnings in Swift 5 mode, and ensures that we diagnose all conditions in Swift 6 mode.
rdar://85913190
…ding [Sema] Use the most precise TRC to extend when building them lazily
rdar://85526879 rdar://85526916
…oncurrency-checking Swift 6 stricter concurrency checking
…cludes only being used from the Swift fork when building stdlib (swiftlang#40173)" This reverts commit 7e33575.
…ect when building stdlib
…7c2f146e7f46e4aebc60453c577c5a from apple/llvm-project Done via the following commands, while having llvm-project checked out at 9ff3a9759b7c2f146e7f46e4aebc60453c577c5a, a commit on the stable/20210726 branch of apple/llvm-project, <swiftlang/llvm-project@9ff3a97>: for i in swift/stdlib/public/LLVMSupport/*.cpp ; do cp llvm-project/llvm/lib/Support/$(basename $i) $i ; done for i in swift/stdlib/include/llvm/ADT/*.h; do cp llvm-project/llvm/include/llvm/ADT/$(basename $i) $i ; done for i in swift/stdlib/include/llvm/Support/*.h; do cp llvm-project/llvm/include/llvm/Support/$(basename $i) $i ; done cp llvm-project/llvm/include/llvm/ADT/ScopeExit.h swift/stdlib/include/llvm/ADT/ScopeExit.h cp llvm-project/llvm/include/llvm/ADT/Twine.h swift/stdlib/include/llvm/ADT/Twine.h cp llvm-project/llvm/include/llvm/Support/raw_ostream.h swift/stdlib/include/llvm/Support/raw_ostream.h
…e-applying b72788c More precisely: 1) git cherry-pick b72788c 2) manually resolve the conflict in AlignOf.h by keeping the HEAD's version of the chunk and discarding the cherry-pick's change 3) git add AlignOf.h 4) git status | grep "deleted by us" | awk '{print($4)}' | xargs git rm 5) git cherry-pick --continue Original namespacing commit message: > This adds the `__swift::__runtime` inline namespace to the LLVMSupport > interfaces. This avoids an ODR violation when LLVM and Swift are in the > same address space. It also will aid in the process of pruning the > LLVMSupport library by ensuring that accidental leakage of the llvm > namespace does not allow us to remove symbols which we rely on.
This re-applies the "pruning" commit from bb10270, which did the following: - Remove many whole files, - Remove "epoch tracking" and "reverse iteration" support from ADT containers - Remove "ABI break checking" support from STLExtras - Remove float parsing functions from StringExtras.h - Remove APInt/APSInt dependencies from StringRef.h + StringRef.cpp (edit distance, int parsing) - Remove some variants of error handling and dependency of dbgs() from ErrorHandling.h and ErrorHandling.cpp We don't need to do the whole-file-removal step, because that's already done, but the rest is re-applied by doing: 1) git cherry-pick bb10270 2) manually resolving conflict in ADT/DenseMap.h by keeping HEAD's version of the chunk and removing epoch tracking from it 3) manually resolving conflict in ADT/STLExtras.h by keeping HEAD's version of the chunk and removing ABI check checking from it 4) manually resolving conflict in ADT/StringExtras.h by deleting the whole chunk (removing APInt/APSInt dependent functions) 5) manually resolving conflict in ErrorHandling.cpp by force-applying the cherry-pick's version (removing write() calls and OOM callback) 6) manually resolving the three conflicts in CMakeLists.txt files by keeping HEAD's version completely 7) git add stdlib/include/llvm/{ADT/StringSwitch.h,ADT/Twine.h,Support/raw_ostream.h} Original commit description: > Reduce LLVMSupport to the subset required for the runtime. This reduces > the TCB and the overheads of the runtime. The inline namespace's > preservation ensures that ODR violations do not occur.
…hat the Swift's fork has Since the previous commits re-imported "vanilla" versions of LLVMSupport, we need to re-apply all modifications that the Swift's fork has made since the last import. More precisely: 1) git diff 7b70120..origin/main -- stdlib/include/llvm stdlib/public/LLVMSupport | git apply -3 --exclude "stdlib/include/llvm/Support/DataTypes.h" --exclude "stdlib/include/llvm/Config/llvm-config.h.cmake" 2) manually resolve conflict in STLExtras.h by applying the "__swift::__runtime" prefix to HEAD's version 3) manually resolve conflicts in StringSwitch.h by keeping HEAD's version (removing the Unicode BOM marker at the beginning of the file, keeping LLVM's version of the string functions) 4) manually resolve conflict in SwapByteOrder.h by adding the `defined(__wasi__)` part into the #if
…ypes.h and STLForwardCompat.h Most cases can drop the #includes without any changes, in some cases there are straighforward replacements (climits, cstdint). For STLForwardCompat.h, we need to bring in parts of STLForwardCompat.h from llvm-project.
… std::string when producing fatal errors messages
…-Playgrounds-trains-like-Xcode-trains [CMake] Also treat builds in Playgrounds trains as "Xcode" builds. This addresses <rdar://problem/85511438>.
Reapply "Teach TypeLayout the Different Types of References" with fixes
…entable-enum-equal-synthesis Sema: Narrow down the derivation of == for RawRepresentable enums to non-resilient modules
test: mark flaky test as depending on rdar
[Sema] Don't insert an @_spi on imports for clang SPIs
…present variables. And update all of the tests.
…ith-history Re-land 7e33575 with history
Add #ifndef NDEBUG around assert() calls that use helper functions/variables that are also under #ifndef NDEBUG
…t-conditionals-when-needed Only #include <TargetConditionals.h> when present
…ome-SourceKit-CMake-issues [CMake] Fix a couple SourceKit CMake issues. This addresses <rdar://problem/85511244>.
…b9cc040ac868b7a93f6049d
…ate-in-assert [Sema] Report public imports of private module as error in asserts mode
[ClangImporter] Handle allowing PCM/PCH errors
…3f9651bda7834965d471b09 [silgen] Add the lexical flag on more alloc_stack that are used to represent variables.
MaxDesiatov
approved these changes
Dec 4, 2021
MaxDesiatov
approved these changes
Dec 4, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )