Commit Graph

9 Commits

Author SHA1 Message Date
Alsey Coleman Miller
62b7be4e9c [stdlib] Add RISCV64 support 2022-11-01 23:59:42 -07:00
Egor Zhdan
84a1ffcb33 [Shims] Include SwiftShims headers without ../
This replaces a number of `#include`-s like this:
```
#include "../../../stdlib/public/SwiftShims/Visibility.h"
```
with this:
```
#include "swift/shims/Visibility.h"
```

This is needed to allow SwiftCompilerSources to use C++ headers which include SwiftShims headers. Currently trying to do that results in errors:
```
swift/swift/include/swift/Demangling/../../../stdlib/public/SwiftShims/module.modulemap:1:8: error: redefinition of module 'SwiftShims'
module SwiftShims {
       ^
Builds.noindex/swift/swift/bootstrapping0/lib/swift/shims/module.modulemap:1:8: note: previously defined here
module SwiftShims {
       ^
```
This happens because the headers in both the source dir and the build dir refer to SwiftShims headers by relative path, and both the source root and the build root contain SwiftShims headers (which are equivalent, but since they are located in different dirs, Clang treats them as different modules).
2022-09-14 11:14:50 +01:00
Alsey Coleman Miller
0ab3eec987 Added PowerPC 32-bit support 2022-03-03 22:21:33 -05:00
Saleem Abdulrasool
ca39bb5b10 stubs: avoid reaching up-tree, prefer inclusion options
This removes the explicit tree structure reference in the stubs to
locate the shims.  Instead, it expects that the `SwiftShims` directory
will be added to the header search path.
2022-01-14 09:34:56 -08:00
Adam Thayer
eddecbfcd4 [i686 Linux] Add __mulodi4 Math Stub to i686
Win and Linux Arm32 have the same aversion to linking compiler-rt for this.
2018-09-28 10:14:44 -07:00
Saleem Abdulrasool
2d04b8491b stdlib: check for ARM/ARM64 more thoroughly (NFC)
Update the instances of checks for architectures to be more broad for different
spellings of the architecture macro.  Certain targets use `_M_ARM` and others
use `__arm__`.  Similarly, arm64/aarch64 has `_M_ARM64`, `__arm64__` and
`__aarch64__` as spellings.  This just mechanically goes through and encodes the
various spellings.

Take the opportunity to replace some raw checks with `defined` checks which
avoids a pedantic warning due to the undefined macro when performing the check
as the preprocessor may warn about an undefined condition evaluating to `0`.
2018-09-21 11:24:03 -07:00
Azoy
b8fc8b333c Remove _interface 2018-07-29 10:41:22 -04:00
Saleem Abdulrasool
d55d348016 stdlib: add additional compiler rt routines
The quad precision support in visual studio does not support
the operations which clang will sometimes lower.  These currently
generate code using GNU extensions.  Add additional stubs for math
routines on Windows.  This allows the standard library to build in
debug mode.
2018-04-15 17:01:30 -07:00
Saleem Abdulrasool
0a1352efff stubs: split up compiler-rt routines
Move the duplicated compiler-rt support routines into its own source
file.  This will need to be expanded for Windows.  As on Linux, there
are certain builtin routines which are not available from the standard
runtime and need to be augmented for now.
2018-04-13 09:44:42 -07:00