You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make the following documentation changes:
* update last tested version number and emphasize that the process
may work for later platform versions,
* update required packages to emphasize py3 instead of py2.7,
* python3 link is not strictly required to need root.
* update the suggested checkout config file to the stable branch used
in the "upstream" checkout config file, and
* mention some extra flags are now required to properly switch off
Dispatch (since without pr swiftlang/swift-corelibs-libdispatch#559
Dispatch won't compile).
* reinforce building release by default, since the flags likely needed
for debug builds aren't provided in the command snippet.
Because LLVM is built as part of building Swift and does not include some of the patches to handle the OpenBSD library naming convention, you will need to create some symlinks:
@@ -23,10 +23,10 @@ $ doas ln -s /usr/lib/libpthread.so.26.1 /usr/lib/libpthread.so
23
23
24
24
*Note: you may need to update the version numbers if necessary.*
25
25
26
-
Also link `~/bin/python` to the `python2.7` binary:
26
+
Also link `~/bin/python` to the `python3` binary:
27
27
28
28
```shell
29
-
$ doas ln -s /usr/local/bin/python2.7~/bin/python
29
+
$ ln -s /usr/local/bin/python3~/bin/python
30
30
```
31
31
32
32
Since the build requires significant amounts of memory at certain points, you may need to ensure that the user you are using to build Swift has the appropriate limits set. Using the `staff` group in `login.conf` and ensuring the shell limits are raised is recommended.
@@ -50,14 +50,16 @@ Download the sources with the [Getting Started](/docs/HowToGuides/GettingStarted
50
50
"aliases": [ "main", "swift/main" ],
51
51
"repos": {
52
52
"cmark": "main",
53
-
"llvm-project": "swift/main",
53
+
"llvm-project": "stable/20211026",
54
54
"swift": "main"
55
55
}
56
56
}
57
57
}
58
58
}
59
59
```
60
60
61
+
*Note: you may need to check `utils/update_checkout/update-checkout-config.json` for the correct LLVM stable branch to build against.*
62
+
61
63
## Building
62
64
63
65
Once the sources have completed downloading, you can use the standard `build-script` mechanism to start building Swift. However, some options are required to be set to successfully build Swift.
@@ -66,23 +68,26 @@ These options are:
66
68
*`--skip-build-clang-tools-extra` and `--skip-build-compiler-rt`: to ensure LLVM builds cleanly,
67
69
*`--extra-cmake-options=`
68
70
*`-DCMAKE_DISABLE_FIND_PACKAGE_Backtrace=TRUE,-DCMAKE_DISABLE_FIND_PACKAGE_LibXml2=TRUE,-DLLVM_VERSION_SUFFIX=''`: to ensure LLVM builds cleanly,
69
-
*`-DSWIFT_BUILD_SOURCEKIT=OFF,-DSWIFT_BUILD_SYNTAXPARSERLIB=OFF,-DSWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY=OFF`: to ensure Swift does not attempt to build libdispatch, which is not yet supported on OpenBSD,
71
+
*`-DSWIFT_ENABLE_DISPATCH=FALSE,-DSWIFT_BUILD_SOURCEKIT=OFF,-DSWIFT_BUILD_SYNTAXPARSERLIB=OFF,-DSWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY=OFF,-DSWIFT_IMPLICIT_CONCURRENCY_IMPORT=OFF,-DSWIFT_ENABLE_EXPERIMENTAL_DISTRIBUTED=OFF`: to ensure Swift does not attempt to build libdispatch, which is not yet supported on OpenBSD,
70
72
*`-DSWIFT_USE_LINKER=lld`: to specify that `lld` should be used over `gold`,
71
73
*`-DCMAKE_INSTALL_DIR=/usr/local"`: to set the correct platform install directory.
72
74
73
75
In full, the minimal set of flags to supply to `build-script` looks like:
0 commit comments