commit | 8ff4b5ae0a6ae35d3b12cf62cb90f5baf8263193 | [log] [tgz] |
---|---|---|
author | Rosica Dejanovska <rosica@google.com> | Fri Sep 23 08:36:48 2022 -0700 |
committer | Copybara-Service <copybara-worker@google.com> | Fri Sep 23 08:37:20 2022 -0700 |
tree | 303da76c4b43f5de8b152719f5beee96b38b1010 | |
parent | d9ff4abac0ac5e21e74aa0c08eb8e771d12f044a [diff] |
Add functionality for merging C++ namespaces We'll be using it from the `cc_import!` macro, in order to produce a single `mod` for namespaces reopened in multiple targets, for example, if two C++ dependencies contain the same namespace `ns`, ``` cc_import!( "//:dep1", "//:dep2" ); ``` will expand to ``` mod ns { use dep1::ns::*; use dep2::ns::*; } ``` PiperOrigin-RevId: 476378297
Extremely experimental interop tooling for C++ and Rust.
Please don‘t use, this is an experiment and we don’t yet know where will it take us. There will be breaking changes without warning. Unfortunately, we can't take contributions at this point.
$ apt install clang lld bazel $ git clone git@github.com:google/crubit.git $ cd crubit $ bazel build --linkopt=-fuse-ld=/usr/bin/ld.lld //rs_bindings_from_cc:rs_bindings_from_cc_impl
$ git clone https://github.com/llvm/llvm-project $ cd llvm-project $ CC=clang CXX=clang++ cmake -S llvm -B build -DLLVM_ENABLE_PROJECTS='clang' -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install $ cmake --build build -j $ # wait... $ cmake --install build $ cd ../crubit $ LLVM_INSTALL_PATH=../llvm-project/install bazel build //rs_bindings_from_cc:rs_bindings_from_cc_impl