commit | 1b90d41a80dd26693405c745e6dce9be17ccfa67 | [log] [tgz] |
---|---|---|
author | Googler <no-reply@google.com> | Mon Sep 26 08:49:05 2022 -0700 |
committer | Copybara-Service <copybara-worker@google.com> | Mon Sep 26 08:49:53 2022 -0700 |
tree | 7ad303287e4c675c8d83d1b915f0053f876de8d7 | |
parent | 0ee01533f65f6efe1c908c2fcfc31d5cdb222a77 [diff] |
rs_bindings_from_cc: avoid generating bindings for types of arguments of private methods. Previously the check that verified visibility of a method came fairly late in the generation of bindings for a function. This caused bindings to the type of some arguments of private methods to be generated, causing issues in C++ code during compilation. The example in private_method.h failed to compile because crubit attempted to generate bindings to the specialization of Ptr<Inner> but Inner is not visibile to the binding code. PiperOrigin-RevId: 476907408
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