-
-
Notifications
You must be signed in to change notification settings - Fork 459
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleaning up the build to work with the new code, and on Windows.
- Loading branch information
1 parent
bc508e4
commit c39f190
Showing
5 changed files
with
59 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
# MSVC+Bazel can't stand for the header at the root, so we have to use the amalgamated one | ||
cc_library( | ||
name = "flecs", | ||
visibility = ["//visibility:public"], | ||
|
||
srcs = ["flecs.c"], | ||
hdrs = ["flecs.h"], | ||
) | ||
|
||
# In theory this is the correct build rule (if it was named `:flecs`) | ||
cc_library( | ||
name = "flecs-broken", | ||
|
||
srcs = glob(["src/**/*.h*", "src/**/*.c*", "src/**/*.inl"]), | ||
hdrs = glob(["include/**/*.h*"]), | ||
includes = ["include"], | ||
strip_include_prefix = "include", | ||
|
||
# because the MSVC include path generator is just wrong | ||
# see gh: https://github.com/bazelbuild/bazel/issues/8706#issuecomment-985133244 | ||
features = select({ | ||
"@bazel_tools//src/conditions:windows": ["-include_paths"], | ||
"//conditions:default": [], | ||
}), | ||
copts = select({ | ||
"@bazel_tools//src/conditions:windows": ["/Iinclude"], | ||
"//conditions:default": [], | ||
}), | ||
) |
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 |
---|---|---|
|
@@ -3,15 +3,16 @@ load("@bazel_tools//tools/build_defs/repo:git.bzl", "new_git_repository") | |
new_git_repository( | ||
name = "bake", | ||
remote = "[email protected]:SanderMertens/bake.git", | ||
commit = "cfc90745f9daa7b7fba80f229af18cdd5029b066", | ||
shallow_since = "1614835160 -0800", | ||
commit = "e2b3d03b61ef36e17a41aa76cb9395b4260468aa", | ||
shallow_since = "1637826538 -0800", | ||
|
||
build_file_content = """ | ||
cc_library( | ||
name = "driver-test", | ||
visibility = ["//visibility:public"], | ||
deps = [":util", ":bake"], | ||
defines = ["bake_test_STATIC"], | ||
srcs = glob(["drivers/test/src/**/*.c", "drivers/test/src/**/*.h"]), | ||
hdrs = glob(["drivers/test/include/**/*.h"]), | ||
includes = ["drivers/test/include"], | ||
|
@@ -30,10 +31,10 @@ cc_library( | |
cc_library( | ||
name = "util", | ||
visibility = ["//visibility:public"], | ||
defines = ["__BAKE__", "_XOPEN_SOURCE=600"], | ||
defines = ["UT_IMPL", "__BAKE__", "_XOPEN_SOURCE=600"], | ||
linkopts = select({ | ||
"@bazel_tools//src/conditions:windows": [], | ||
"@bazel_tools//src/conditions:windows": ["-DEFAULTLIB:dbghelp -DEFAULTLIB:shell32 -DEFAULTLIB:shlwapi"], | ||
"//conditions:default": ["-lrt -lpthread -ldl"], | ||
}), | ||
|
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