commit | 001852d5ea8508fe194ec838ae5572799d7de91a | [log] [tgz] |
---|---|---|
author | Rosica Dejanovska <rosica@google.com> | Tue Jun 07 14:19:41 2022 -0700 |
committer | Copybara-Service <copybara-worker@google.com> | Tue Jun 07 14:20:16 2022 -0700 |
tree | 0f84a18c207d31021e77c263c696ccf1fcc512bb | |
parent | bf1c9ccf84dbbf637be4b3276997bac7828a6e96 [diff] |
Generate IR for namespace items coming from a different target In the past we didn't have unique identifiers for the IR items, and similar items that appeared in multiple targets (eg reopened namespace accross targets) would confuse the bindings generator. We're past that point. Now we try to import all the decls from the translation unit, but we only put top level items from the current target into ir.top_level_items, so that we still generate source code only for the current target. PiperOrigin-RevId: 453523844
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