You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
현재 Rust와 C 코드 사이에는 LTO가 작동하지 않고 있습니다. C FFI 함수들에다가 #[inline] 어트리뷰트를 붙이면 컴파일이 제대로 안 되는 데 이것이 원인입니다. #21 을 해결하는 도중에 쓸데없는 오버헤드가 있는 getter를 너무 많이 만들어서, 이것을 해결하려다가 알게 되었습니다.
Rust에서는 이 문제를 해결하기 위해서 -Clinker-plugin-lto 라는 옵션이 있습니다. 하지만 이 옵션은 정말 써먹기 어렵습니다. 삽질의 과정을 기록해 둡니다:
현재 Rust와 C 코드 사이에는 LTO가 작동하지 않고 있습니다. C FFI 함수들에다가
#[inline]
어트리뷰트를 붙이면 컴파일이 제대로 안 되는 데 이것이 원인입니다. #21 을 해결하는 도중에 쓸데없는 오버헤드가 있는 getter를 너무 많이 만들어서, 이것을 해결하려다가 알게 되었습니다.Rust에서는 이 문제를 해결하기 위해서
-Clinker-plugin-lto
라는 옵션이 있습니다. 하지만 이 옵션은 정말 써먹기 어렵습니다. 삽질의 과정을 기록해 둡니다:Rust backend를 다 prebuilts에 있는 clang을 사용하도록 바꾸면 될 것 같긴 한데 그렇게 쓸모있을 것 같진 않습니다. 사실 컴파일 타임이 너무 길어져서 지금은 당장 필요하지 않네요. 아무튼 인라이닝을 안하는 이유에 대한 문서만 남겨두는 걸로...
The text was updated successfully, but these errors were encountered: