Skip to content

Commit

Permalink
- Bump version number in README in anticipation of next release.
Browse files Browse the repository at this point in the history
- Add instructions about configuring Clang on Linux.

RELNOTES: Linux users must set `CC=clang` in their environment.
PiperOrigin-RevId: 206804748
  • Loading branch information
allevato committed Jul 31, 2018
1 parent 981890e commit 1ef49f7
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ repository.

## Compatibility

These rules have been verified to work with **Bazel 0.14.1.**
These rules have been verified to work with **Bazel 0.16.0.**

## Quick Setup

Expand Down Expand Up @@ -51,7 +51,7 @@ rules you wish to depend on:
git_repository(
name = "build_bazel_rules_swift",
remote = "https://github.com/bazelbuild/rules_swift.git",
tag = "0.1.1",
tag = "0.3.0",
)

load(
Expand All @@ -66,6 +66,17 @@ The `swift_rules_dependencies` macro creates a toolchain appropriate for your
platform (either by locating an installation of Xcode on macOS, or looking for
`swiftc` on the system path on Linux).

### 3. Additional configuration (Linux only)

The `swift_binary` and `swift_test` rules expect to use `clang` as the driver
for linking, and they query the Bazel C++ API and CROSSTOOL to determine which
arguments should be passed to the linker. By default, the C++ toolchain used by
Bazel is `gcc`, so Swift users on Linux need to override this by setting the
environment variable `CC=clang` when invoking Bazel.

This step is not necessary for macOS users because the Xcode toolchain always
uses `clang`.

## Future Work

* Support for building and linking to shared libraries (`.dylib`/`.so`) written
Expand Down

0 comments on commit 1ef49f7

Please sign in to comment.