-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: switch to clang (PROOF-620) (#13)
* ci: replace gcc with clang in build env setup ( PROOF-633 ) * ci: undo gcc compiler option removal ( PROOF-633 ) * ci: update the Docker image tag ( PROOF-638 ) * bump bazel version * port base package * migrate base * migrate memory * port cbindings * get cbindings building * fix linking * make linking portable * port benchmarks * migrate examples * fix format * drop legacy cuda rules * fix gpu image * clean up build * rename * clean up bazel rules * clean up bazel options * undo * clean up * clean up * clean up * clean up * clean up * fix --------- Co-authored-by: Jacob Trombetta <[email protected]>
- Loading branch information
1 parent
66cfb31
commit c203823
Showing
125 changed files
with
253 additions
and
8,065 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 |
---|---|---|
@@ -1 +1 @@ | ||
6.2.1 | ||
6.3.2 |
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
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,103 @@ | ||
load("@rules_cuda//cuda:defs.bzl", "cuda_library", "cuda_objects") | ||
|
||
# We add this -std=c++20 flag, because | ||
# benchmarks could not be compiled without it. | ||
# The `build --cxxopt -std=c++20` flag set in the | ||
# `.bazelrc` file was not passed to the compiler. | ||
# However, this flag is relevant to some modules. | ||
def sxt_copts(): | ||
return [ | ||
"-std=c++20", | ||
"-Wno-unknown-cuda-version", | ||
] | ||
|
||
def sxt_cc_component( | ||
name, | ||
copts = [], | ||
is_cuda = False, | ||
with_test = True, | ||
alwayslink = False, | ||
test_deps = [], | ||
deps = [], | ||
impl_deps = [], | ||
**kwargs): | ||
cuda_objects( | ||
name = name, | ||
hdrs = [ | ||
name + ".h", | ||
], | ||
srcs = [ | ||
name + ".cc", | ||
], | ||
copts = sxt_copts(), | ||
deps = deps + impl_deps + [ | ||
"@local_cuda//:cuda_runtime_static", | ||
], | ||
visibility = ["//visibility:public"], | ||
**kwargs | ||
) | ||
if with_test: | ||
test_lib = name + ".t-lib" | ||
deps_p = [ | ||
":" + name, | ||
] + deps + test_deps | ||
cuda_library( | ||
name = test_lib, | ||
copts = sxt_copts(), | ||
deps = [ | ||
":" + name, | ||
] + test_deps, | ||
srcs = [ | ||
name + ".t.cc", | ||
], | ||
rdc = True, | ||
) | ||
native.cc_test( | ||
name = name + ".t", | ||
copts = sxt_copts() + copts, | ||
deps = [ | ||
":" + test_lib, | ||
] + test_deps + [ | ||
"@com_github_catchorg_catch2//:catch2", | ||
"@com_github_catchorg_catch2//:catch2_main", | ||
], | ||
visibility = ["//visibility:public"], | ||
**kwargs | ||
) | ||
|
||
def sxt_cc_library( | ||
name, | ||
copts = [], | ||
deps = [], | ||
impl_deps = [], | ||
**kwargs): | ||
cuda_objects( | ||
name = name, | ||
copts = sxt_copts(), | ||
deps = deps + impl_deps, | ||
visibility = ["//visibility:public"], | ||
**kwargs | ||
) | ||
|
||
def sxt_cc_binary( | ||
name, | ||
srcs = [], | ||
copts = [], | ||
deps = [], | ||
**kwargs): | ||
libname = name + "-lib" | ||
cuda_library( | ||
name = libname, | ||
srcs = srcs, | ||
copts = sxt_copts() + copts, | ||
deps = deps, | ||
rdc = True, | ||
**kwargs | ||
) | ||
native.cc_binary( | ||
name = name, | ||
deps = [ | ||
":" + libname, | ||
] + deps, | ||
**kwargs | ||
) |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.