Skip to content

Commit

Permalink
Merge pull request #2 from fowles/main
Browse files Browse the repository at this point in the history
devtools: add x86_64 mac and compile-commands.json
  • Loading branch information
asoffer authored Sep 19, 2024
2 parents 591a4f6 + 29b67b2 commit 422fd80
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@
bazel-*
site/
.gitignore
compile_commands.json
external
.cache
8 changes: 8 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
bazel_dep(name = "abseil-cpp", version = "20240722.0")
bazel_dep(name = "platforms", version = "0.0.10")

bazel_dep(name = "hedron_compile_commands", dev_dependency = True)
git_override(
module_name = "hedron_compile_commands",
remote = "https://github.com/hedronvision/bazel-compile-commands-extractor.git",
commit = "1e08f8e0507b6b6b1f4416a9a22cf5c28beaba93",
)

register_toolchains(
"//bazel:linux_x86_64_toolchain",
"//bazel:macos_arm64_toolchain",
"//bazel:macos_x86_64_toolchain",
)
16 changes: 16 additions & 0 deletions bazel/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,22 @@ clang_toolchain(
warnings = WARNINGS,
)

clang_toolchain(
name = "macos_x86_64_toolchain",
os = "macos",
cpu = "x86_64",
c_compiler_path = "/opt/local/bin/clang-mp-18",
cc_compiler_path = "/opt/local/bin/clang++-mp-18",
ar_path = "/opt/local/bin/llvm-ar-mp-18",
builtin_include_directories = [
"/opt/local/libexec/llvm-18/include/c++/v1",
"/opt/local/libexec/llvm-18/lib/clang/18",
"/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk",
],
system_headers = SYSTEM_HEADERS,
warnings = WARNINGS,
)

config_setting(
name = "dbg",
values = {"compilation_mode": "dbg"},
Expand Down

0 comments on commit 422fd80

Please sign in to comment.