This is an archive of the discontinued LLVM Phabricator instance.

[CMake] Disable exceptions in cpp-httplib
AbandonedPublic

Authored by aidengrossman on Jun 3 2023, 3:03 AM.

Details

Summary

This patch disables exceptions in cpp-httplib which are turned on by
default and only disabled through the use of a preprocessor macro.

Diff Detail

Event Timeline

aidengrossman created this revision.Jun 3 2023, 3:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 3 2023, 3:03 AM
aidengrossman requested review of this revision.Jun 3 2023, 3:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 3 2023, 3:03 AM

I'm not totally sure why this is popping up on my system and doesn't appear at all in the Fuchsia builds, because exceptions have been in cpp-httplib for a while and since it is a header only (at least in the default configuration) and needs this flag defined to disable features. I don't think it's being built as a shared library with exceptions turned off at that stage?

phosek added a comment.Jun 3 2023, 3:20 PM

Thanks for catching this, I'm also not sure why this doesn't come up in our build. I think it'd be cleaner to provide a CMake option to disable exceptions in the generated CMake package, I created https://github.com/yhirose/cpp-httplib/pull/1580 that implements that.

aidengrossman abandoned this revision.Jun 3 2023, 3:23 PM

Thanks for looking into this! Disabling it in the generated CMake package definitely does seem like the cleaner option.