-
Notifications
You must be signed in to change notification settings - Fork 233
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: The example included some old code that needed to be updated for compatibility with recent Starlark API changes. At the moment the build does also have an implicit dependency on the prelude, so until that's fixed it's worked around by linking the prelude into the project. Finally, the compiler toolchain introduced in the example was only used by the binary rule, but not by the library rule. This PR fixes that to use the toolchain consistently. Pull Request resolved: #13 Reviewed By: arlyon Differential Revision: D39724852 Pulled By: arlyon fbshipit-source-id: bd8ac4d3ce188dcb6b1f7cc98a09dad7c578242f
- Loading branch information
1 parent
fceff44
commit ff449c3
Showing
7 changed files
with
34 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
load("//:toolchain.bzl", "cpp_local_toolchain") | ||
|
||
cpp_local_toolchain( | ||
name = "clang", | ||
command = "clang++", | ||
visibility = ["PUBLIC"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,9 @@ | ||
load("//:rules.bzl", "cpp_binary") | ||
load("//:toolchain.bzl", "cpp_local_toolchain") | ||
|
||
cpp_local_toolchain( | ||
name = "clang", | ||
command = "clang++", | ||
) | ||
|
||
cpp_binary( | ||
name = "main", | ||
srcs = glob(["src/**/*.cpp"]), | ||
headers = glob(["src/**/*.hpp"]), | ||
toolchain = ":clang", | ||
toolchain = "//:clang", | ||
deps = [], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../prelude |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters