Commit Graph

1342 Commits

Author SHA1 Message Date
Kuba Mracek
56016a8649 [embedded] Avoid strip-ing .a embedded libraries 2024-05-28 14:03:58 -07:00
Kuba Mracek
1113cffd4b [embedded] Avoid building embedded stdlib when cross-compiling 2024-05-28 14:03:58 -07:00
Kuba Mracek
770d59cc91 [embedded] Avoid building embedded stdlib when cross-compiling 2024-05-28 07:51:17 -07:00
swift-ci
b14e67d820 Merge remote-tracking branch 'origin/main' into rebranch 2024-05-23 22:14:52 -07:00
Evan Wilde
e0f81dadc6 Only set clang linker if it exists
It we're not building clang, the swift driver silently dies and fails to
build. While it shouldn't do that, we should also only tell it to use a
clang that exists. If we're not building clang or the "native" clang
doesn't exist, leave the environment variable unset and let the driver
choose something.
2024-05-23 14:26:34 -07:00
swift-ci
24e9740242 Merge remote-tracking branch 'origin/main' into rebranch 2024-05-20 09:54:08 -07:00
Evan Wilde
b35aecb6d5 Use consistent clang through build
The just-built Swift driver was picking up the system clang, which would
try to use the bfd linker instead of gold or lld. bfd doesn't like how
Swift handles protected symbols and fails with the following error:

```
error: link command failed with exit code 1 (use -v to see invocation)
/usr/bin/ld: /home/build-user/build/buildbot_linux/libdispatch-linux-x86_64/src/swift/CMakeFiles/swiftDispatch.dir/Block.swift.o: relocation R_X86_64_PC32 against protected symbol `$s8Dispatch0A13WorkItemFlagsVSYAAMc' can not be used when making a shared object
/usr/bin/ld: final link failed: bad value
```

This patch tells the Swift-Driver where it should find its clang, and
makes it match the clang that is in use through the rest of the build.
2024-05-15 13:11:06 -07:00
swift-ci
c30af15f40 Merge remote-tracking branch 'origin/main' into rebranch 2024-05-06 23:14:44 -07:00
eeckstein
ade04a7945 Merge pull request #73417 from eeckstein/force-bootstrapping
Force enabling SwiftCompilerSources in the build
2024-05-07 07:55:23 +02:00
swift-ci
082c552a2f Merge remote-tracking branch 'origin/main' into rebranch 2024-05-06 09:55:11 -07:00
Erik Eckstein
410b81b447 Force enabling SwiftCompilerSources in the build
This means that `bootstrapping=off` cannot be used anymore.
2024-05-06 17:22:27 +02:00
Alastair Houghton
7431b96798 [Build] Only add -lfts for linux-static-*.
Looks like I'd unconditionally added -lfts to the Foundation build flags.

rdar://123503470
2024-05-06 10:54:36 +01:00
Alastair Houghton
3627507eb1 [Build] Further static Linux SDK support changes.
Fix some indentation issues.

Change `build-script-impl` to make `build-linux-static` a positive argument.

Fix documentation for `--linux-archs` and `--linux-static-archs` (the options
are comma separated for `build-script`, but semicolon separated for
`build-script-impl`).

Set the default for `linux-static-archs` to `x86_64, aarch64` so that we
install the expected content in the toolchain.

Add missing default for `test_linux_static`.

Make sure to pass down `--skip-build-linux` and `--build-linux-static`.

Factor out config file generation and call it from the install step in `llvm.py`
as well as from the build step.

rdar://123503470
2024-05-03 09:12:49 +01:00
Alastair Houghton
fdc8ffd36f [Build] Updated following initial comments from Eric.
Change the `--linux[-static]-arch` option to `--linux[-static]-archs`, on the
basis that it supports multiple values.

Other tidying.

rdar://123503470
2024-05-02 14:56:18 +01:00
Alastair Houghton
ae1c0455f3 [Build] Add the new fully-static Linux SDK.
Declare a new `LINUX_STATIC` SDK and configure it.

Add options to set the build architectures for the `LINUX` and
`LINUX_STATIC` SDKs, similar to what we have for Darwin, because
we'll be cross-compiling.

Also add an option to point the build system at the sources for
the musl C library, which we're using for `LINUX_STATIC`.

rdar://123503470
2024-05-02 14:56:18 +01:00
Nate Chandler
c43f87101f Merge branch 'main' into rebranch
Conflicts:
      lib/Basic/Platform.cpp

```
diff --git a/lib/Basic/Platform.cpp b/lib/Basic/Platform.cpp
index 240edfa144a..1797c87635f 100644
--- a/lib/Basic/Platform.cpp
+++ b/lib/Basic/Platform.cpp
@@ -200,10 +200,7 @@ StringRef swift::getPlatformNameForTriple(const llvm::Triple &triple) {
   case llvm::Triple::CUDA:
   case llvm::Triple::DragonFly:
   case llvm::Triple::DriverKit:
-<<<<<<< HEAD
   case llvm::Triple::ELFIAMCU:
-=======
->>>>>>> main
   case llvm::Triple::Emscripten:
   case llvm::Triple::Fuchsia:
   case llvm::Triple::HermitCore:
```
2024-04-17 13:32:48 -07:00
Artem Chikin
1f14158a1d Introduce VisionOS Platform
This change introduces a new compilation target platform to the Swift compiler - visionOS.

- Changes to the compiler build infrastrucuture to support building compiler-adjacent artifacts and test suites for the new target.
- Addition of the new platform kind definition.
- Support for the new platform in language constructs such as compile-time availability annotations or runtime OS version queries.
- Utilities to read out Darwin platform SDK info containing platform mapping data.
- Utilities to support re-mapping availability annotations from iOS to visionOS (e.g. 'updateIntroducedPlatformForFallback', 'updateDeprecatedPlatformForFallback', 'updateObsoletedPlatformForFallback').
- Additional tests exercising platform-specific availability handling and availability re-mapping fallback code-path.
- Changes to existing test suite to accomodate the new platform.
2024-04-10 09:38:02 -07:00
swift_jenkins
efab2fb26c Merge remote-tracking branch 'origin/main' into next 2024-03-27 17:13:53 -07:00
Rintaro Ishizaki
05d3ff7fab Merge pull request #72629 from rintaro/macros-no-xcodeplugin
[Macros] Remove plugin related flags from toolchain Info.plist
2024-03-28 08:54:16 +09:00
Rintaro Ishizaki
5d48a5a122 [Macros] Remove plugin related flags from toolchain Info.plist
`-external-plugin-path` flags pointing XcodeDefault.xctoolchain were
needed to use macro plugins in Apple SDK. But since Apple macro plugins
are not in `.xctoolchain` anymore, these flags are useless.

rdar://125498074
2024-03-27 10:42:58 -07:00
swift_jenkins
2063e76a27 Merge remote-tracking branch 'origin/main' into next 2024-03-25 07:45:08 -07:00
Eric Miotto
0edd96e311 Merge pull request #72486 from edymtt/emiotto/add-flag-to-pass-arguments-to-dsymutil
build-script: add flag to pass arguments to dsymutil
2024-03-25 07:28:35 -07:00
swift_jenkins
1d0d769d4b Merge remote-tracking branch 'origin/main' into next 2024-03-22 13:06:35 -07:00
Eric Miotto
efdd4954d3 build-script: add flag to pass arguments to dsymutil
This is currently needed to disable DWARF verification in
some Apple internal configurations.

Addresses rdar://125092216
2024-03-22 08:04:31 -07:00
Mike Ash
0491192337 [Runtime] Remove ExternalGenericMetadataBuilder. 2024-03-21 17:56:17 -04:00
swift_jenkins
15dbb1091b Merge remote-tracking branch 'origin/main' into next 2024-03-13 08:41:42 -07:00
Arnold Schwaighofer
ea70aea43c IRGen: Add code to support building fragile resilient protocol witnesses
We don't currently support building resilient relative protocol witness tables.
One might want to build with relative witness tables but not need
resilient protocols. Allow for that scenario.

Add a test configuration to test library-evolution + fragile resilient
protocols + relative protocol witness tables.
2024-03-10 09:14:08 -07:00
swift_jenkins
dc151b0f04 Merge remote-tracking branch 'origin/main' into next 2024-03-01 06:46:48 -08:00
Kuba Mracek
0c9c9918ae [build-script] Avoid stripping clang builtin .a libraries when extracting dSYMs on Darwin 2024-02-29 10:55:11 -08:00
swift_jenkins
fd121f5788 Merge remote-tracking branch 'origin/main' into next 2024-02-23 23:44:52 -08:00
Michael Buch
dd42476381 [build-script] Fix the LLDB redecl completion filter that we pass to llvm-lit
In the presence of multiple `--filter` options, `llvm-lit` will only
pick the last one. Which means we only ever ran the tests under
`commands/`.

This patch turns the multiple filters into a regex.
2024-02-23 13:41:23 +00:00
swift_jenkins
44eaed56be Merge remote-tracking branch 'origin/main' into next 2024-02-22 12:27:59 -08:00
Ian Anderson
5acd961347 Merge pull request #71474 from ian-twilightcoder/builtin-float-overlay
[overlay] Make an overlay for the clang _Builtin_float module
2024-02-22 12:25:54 -08:00
swift_jenkins
8ce5dfac8b Merge remote-tracking branch 'origin/main' into next 2024-02-22 11:18:39 -08:00
Michael Buch
03194eb4b1 Merge pull request #71724 from Michael137/lldb/type-completion-rework/swift-build-script/to-20230725
[build-script] Run LLDB tests with new redecl-completion setting
2024-02-22 19:09:13 +00:00
swift_jenkins
7d8148ac93 Merge remote-tracking branch 'origin/main' into next 2024-02-21 00:08:09 -08:00
swift_jenkins
03c53080e3 Merge remote-tracking branch 'origin/main' into next 2024-02-20 10:51:06 -08:00
Michael Buch
8858585677 [build-script] Run LLDB tests with new redecl-completion setting 2024-02-20 13:41:08 +00:00
Kuba Mracek
38bcffa6ff [embedded] When copying clang builtins from host toolchain, include macho_embedded libraries 2024-02-19 14:36:19 -08:00
Ian Anderson
1ce3935eb7 [overlay] Make an overlay for the clang _Builtin_float module
Clang's builtin float.h is no longer included in OS/SDK modules, and so it needs its own overlay.

rdar://122351557
2024-02-16 12:31:47 -08:00
Shubham Sandeep Rastogi
3107a92bb9 Add libunwind to LLVM_ENABLE_RUNTIMES
We are seeing the following issue

rdar://123102211 (Fix internal/next smooshbase bot's cmake error)

CMake Error at
/Users/buildslave/jenkins/workspace/lldb-internal-next-ios-disclosed-x86_64/llvm-project/libcxxabi/CMakeLists.txt:51 (message):
  LIBCXXABI_USE_LLVM_UNWINDER is set to ON, but libunwind is not specified in
  LLVM_ENABLE_RUNTIMES.

To fix it, we need to add libunwind to the LLVM_ENABLE_RUNTIMES.
2024-02-16 10:13:58 -08:00
Adrian Prantl
acc9100798 Explicitly pass LLDB test config, so it can be picked up by the filter decorators 2024-02-12 08:50:28 -08:00
Alastair Houghton
e48b05f12c [SwiftCompilerSources] Enable use of the -min-runtime-version option.
Turn on the use of `-min-runtime-version` when building the compiler.

rdar://121522431
2024-02-02 16:19:06 +00:00
Mike Ash
4bc7726d43 Merge pull request #70900 from mikeash/swift-generic-metadata-builder-out-of-process
[Tools] Add a library to build specialized generic metadata out of process.
2024-01-26 10:50:34 -05:00
Mike Ash
4341102c92 [Tools] Add a library to build specialized generic metadata out of process.
This library uses GenericMetadataBuilder with a ReaderWriter that can read data and resolve pointers from MachO files, and emit a JSON representation of a dylib containing the built metadata.

We use LLVM's binary file readers to parse the MachO files and resolve fixups so we can follow pointers. This code is somewhat MachO specific, but could be generalized to other formats that LLVM supports.

rdar://116592577
2024-01-24 20:45:50 -05:00
Kavon Farvardin
b92fe5f2e9 [build-script] fix NoncopyableGenerics option
This patch introduces `--enable-experimental-noncopyable-generics` for
the build script. It replaces
`--swift-stdlib-experimental-noncopyable-generics`

The old build option only enables the feature when building the
stdlib, but if we've built the stdlib with NoncopyableGenerics, the
compiler should be hardwired to have that feature enabled, too.

This patch also introduces the `noncopyable_generics` lit parameter, so
that tests assuming the system was built with the feature can live
in-tree and be tested, if they specify `REQUIRES: noncopyable_generics`.
2024-01-23 22:41:59 -08:00
Rokhini Prabhu
6dbf4d2e20 Add support for task-to-thread model to be specified on as part of build presets 2023-12-21 16:00:25 -08:00
Adrian Prantl
71bbe17dc2 Merge pull request #69679 from adrian-prantl/precise-compiler-invocation
Extend the LLDB test matrix to support precise compiler invocations.
2023-11-15 08:46:06 -08:00
Mike Ash
967c5c6a75 Merge pull request #69542 from mikeash/retain-release-override-optional
[Runtime] Add option to remove override point for retain/release.
2023-11-08 19:51:29 -05:00
Adrian Prantl
d3f6ca5683 Extend the LLDB test matrix to support precise compiler invocations. 2023-11-08 16:32:17 -08:00