Skip to content

Attempt to generate a next toolchain with #61668 #61721

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

Conversation

edymtt
Copy link
Contributor

@edymtt edymtt commented Oct 25, 2022

and match the usage pattern employed by other LLVM projects.

For context about the underlying change see  https://reviews.llvm.org/D117977

Addresses rdar://101396797
Also ensure we don't symlink to swift-frontend twice
@edymtt
Copy link
Contributor Author

edymtt commented Oct 25, 2022

@swift-ci please build toolchain

@edymtt
Copy link
Contributor Author

edymtt commented Oct 25, 2022

@swift-ci please build toolchain

edymtt and others added 3 commits October 26, 2022 12:01
Use CMAKE_INSTALL_BINDIR as initial value for SWIFT_TOOLS_INSTALL_DIR
…he function name for exported functions.

More recent versions of Clang (~July 2022) have stricter enforcement of
the positioning of attributes; for example, the `nonnull` and `nodiscard`
attributes can no longer precede the `extern "C"` specifier and must
follow the name of the function (and not the signature of the function)
to which they apply.

(cherry picked from commit 2963c38)
@edymtt edymtt force-pushed the next-adapt-to-new-llvm_install_symlink-signature-plus-cherry-picks branch from c738e09 to 923fc30 Compare October 26, 2022 22:31
@edymtt
Copy link
Contributor Author

edymtt commented Oct 26, 2022

@swift-ci please build toolchain

@edymtt
Copy link
Contributor Author

edymtt commented Oct 27, 2022

Hitting the following error on macOS

In file included from /Users/ec2-user/jenkins/workspace/swift-PR-toolchain-macos/branch-next/swift/lib/Demangling/Errors.cpp:38:
/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.0.sdk/usr/include/malloc/malloc.h:69:16: error: argument to __ptrauth must be an integer constant expression
    size_t      (* MALLOC_ZONE_FN_PTR(size))(struct _malloc_zone_t *zone, const void *ptr); /* returns the size of a block or 0 if not in this zone; must be fast, especially for negative answers */
                   ^
/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.0.sdk/usr/include/malloc/malloc.h:39:10: note: expanded from macro 'MALLOC_ZONE_FN_PTR'
                FALSE, ptrauth_string_discriminator("malloc_zone_fn." #fn)) fn
                       ^
/Users/ec2-user/jenkins/workspace/swift-PR-toolchain-macos/branch-next/buildbot_osx/llvm-macosx-x86_64/lib/clang/13.0.0/include/ptrauth.h:247:3: note: expanded from macro 'ptrauth_string_discriminator'
  __builtin_ptrauth_string_discriminator(__string)
  ^

@edymtt
Copy link
Contributor Author

edymtt commented Oct 27, 2022

Hitting the following error on Linux

In file included from /home/build-user/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_libdispatch.cpp:20:
/home/build-user/llvm-project/compiler-rt/lib/tsan/rtl/tsan_dispatch_defs.h:30:15: error: blocks support disabled - compile with -fblocks or pick a deployment target that supports them
typedef void (^dispatch_block_t)(void);

@edymtt
Copy link
Contributor Author

edymtt commented Oct 27, 2022

Hitting the following on Windows

C:\Users\swift-ci\jenkins\workspace\swift-PR-build-toolchain-windows\swift\include\swift/Demangling/Demangle.h(529): error C2079: 'ManglingError' uses undefined struct 'swift::Demangle::LLVM_NODISCARD'
C:\Users\swift-ci\jenkins\workspace\swift-PR-build-toolchain-windows\swift\include\swift/Demangling/Demangle.h(530): warning C4471: 'Code': a forward declaration of an unscoped enumeration must have an underlying type
C:\Users\swift-ci\jenkins\workspace\swift-PR-build-toolchain-windows\swift\include\swift/Demangling/Demangle.h(531): error C2065: 'Success': undeclared identifier

@edymtt
Copy link
Contributor Author

edymtt commented Oct 27, 2022

@swift-ci please build toolchain Linux

@edymtt
Copy link
Contributor Author

edymtt commented Oct 27, 2022

In Linux I was able to go past the failing point, now we are failing building Swift -- possibly related to https://reviews.llvm.org/D131717

In file included from /home/build-user/swift/lib/Demangling/ManglingUtils.cpp:13:
In file included from /home/build-user/swift/include/swift/Demangling/ManglingUtils.h:16:
/home/build-user/llvm-project/llvm/include/llvm/ADT/Optional.h:84:43: error: no type named 'in_place_t' in namespace 'std'
  constexpr explicit OptionalStorage(std::in_place_t, Args &&...args)
                                     ~~~~~^

@edymtt
Copy link
Contributor Author

edymtt commented Oct 27, 2022

@swift-ci please build toolchain Linux

@edymtt
Copy link
Contributor Author

edymtt commented Oct 27, 2022

That somehow worked, and now I'm getting errors similar to the Windows run

In file included from /home/build-user/swift/lib/Demangling/NodeDumper.cpp:13:
/home/build-user/swift/include/swift/Demangling/Demangle.h:530:3: error: expected expression
  enum Code {
  ^
/home/build-user/swift/include/swift/Demangling/Demangle.h:529:23: error: variable has incomplete type 'struct LLVM_NODISCARD'
struct LLVM_NODISCARD ManglingError {
                      ^
/home/build-user/swift/include/swift/Demangling/Demangle.h:529:8: note: forward declaration of 'swift::Demangle::LLVM_NODISCARD'
struct LLVM_NODISCARD ManglingError {
       ^
/home/build-user/swift/include/swift/Demangling/Demangle.h:571:1: warning: class 'LLVM_NODISCARD' was previously declared as a struct; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]
class LLVM_NODISCARD ManglingErrorOr {
^
/home/build-user/swift/include/swift/Demangling/Demangle.h:529:8: note: previous use is here
struct LLVM_NODISCARD ManglingError {
       ^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants