Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use clang's libc++ to be consistent with zcashd #85

Open
teor2345 opened this issue May 2, 2023 · 0 comments
Open

Use clang's libc++ to be consistent with zcashd #85

teor2345 opened this issue May 2, 2023 · 0 comments

Comments

@teor2345
Copy link
Contributor

teor2345 commented May 2, 2023

Motivation

I notice you're linking with -lstdc++, i.e. libstdc++, whereas zcashd uses libc++. I'm not sure that matters if you're recompiling the script code, just thought I'd point it out.

Originally posted by @daira in #84 (comment)

Currently zcash_script links with the default C++ library for the current platform, using the link-cplusplus crate.

Specifications

Since Zcash script behaviour is unspecified, we should try to match zcashd's behaviour as much as possible. But the C++ library is unlikely to change consensus-critical behaviour.

Background

Zebra already links with libstdc++ (gcc) via RocksDB on Linux. librocksdb-sys has its own custom logic for choosing the default C++ library for each platform.

Zebra also uses libclang as a build dependency, which depends on libc++ (clang).

We might get better optimisations and smaller binaries by preferring the clang compiler and using its libc++ library. However, this could also make Zebra builds harder to configure on some platforms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant