rnpgp / rnp

RNP: high performance C++ OpenPGP library used by Mozilla Thunderbird
https://www.rnpgp.org
Other
194 stars 55 forks source link

CI: Effects of BUILD_MODE on GPG build #1465

Closed ribose-jeffreylau closed 3 years ago

ribose-jeffreylau commented 3 years ago

I have been working on including more platforms to build rnp on, and found that GPG and/or its components (the more recent versions) would fail to build on some platforms with BUILD_MODE = sanitize. I'm wondering if this is due to the fact that sanitize would make GPG build with clang & clang++, and that it happened to have issues with newer codes? The second question is, is this intended?

The following lines set CC and CXX globally in the workflow: https://github.com/rnpgp/rnp/blame/d440935cd257457afc865413070f7b4c4373c535/ci/env-common.inc.sh#L14-L17

ping @dewyatt

ronaldtse commented 3 years ago

Perhaps this is just historical oversight? Would be strange if GPG behaves differently under gcc vs clang.

dewyatt commented 3 years ago

Historically we forced the sanitize CI job to use clang because, at the time, the sanitizers were not as well supported with gcc. We also used to build all library dependencies with sanitizers I think (not sure when we dropped this - maybe a step backwards...).

Regardless, I don't see an issue with sticking to gcc for building gnupg as we only consume it as an executable.

(I'm not sure if that answers your questions...let me know)

dewyatt commented 3 years ago

I guess to summarize, feel free to unset those for the gnupg build portion of CI.

ribose-jeffreylau commented 3 years ago

@dewyatt Thanks for the clarification! This has answered the question.