Skip to content

Commit

Permalink
Adjust 'makeOptions' to new TableGen format of Swift's 'Options.inc'
Browse files Browse the repository at this point in the history
  • Loading branch information
artemcm committed Oct 26, 2023
1 parent 39151f6 commit 432ff74
Show file tree
Hide file tree
Showing 4 changed files with 105 additions and 48 deletions.
8 changes: 6 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,13 @@ let package = Package(
/// The `makeOptions` utility (for importing option definitions).
.executableTarget(
name: "makeOptions",
dependencies: []),
dependencies: [],
// Do not enforce checks for LLVM's ABI-breaking build settings.
// makeOptions runtime uses some header-only code from LLVM's ADT classes,
// but we do not want to link libSupport into the executable.
cxxSettings: [.unsafeFlags(["-DLLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING=1"])]),
],
cxxLanguageStandard: .cxx14
cxxLanguageStandard: .cxx17
)

if ProcessInfo.processInfo.environment["SWIFT_DRIVER_LLBUILD_FWK"] == nil {
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ $ apt-get install libncurses-dev
be found, e.g.:

```
$ swift build -Xcc -I/path/to/build/Ninja-ReleaseAssert/swift-.../include --product makeOptions
$ swift build -Xcc -Xcc -I/path/to/build/Ninja-Release/swift-.../include -Xcc -I/path/to/build/Ninja-Release/llvm-.../include -Xcc -I/path/to/source/llvm-project/llvm/include --product makeOptions
```

Then, run `makeOptions` and redirect the output to overwrite `Options.swift`:
Expand Down
Loading

0 comments on commit 432ff74

Please sign in to comment.