# Firefox-local: include moz-overrides.h in the translation units that use # exceptions, so the library builds with -fno-exceptions (see moz-overrides.h, # kept across vendoring). In parakeet_capi.cpp the project headers move below # the system headers, because moz-overrides.h redefines `throw`/`try`/`catch` # and must not be in effect while the system headers are parsed. # --- a/src/ctc_decoder.cpp +++ b/src/ctc_decoder.cpp @@ -6,6 +6,7 @@ #include #include #include +#include "moz-overrides.h" namespace pk { --- a/src/model.cpp +++ b/src/model.cpp @@ -23,6 +23,7 @@ #include #include #include +#include "moz-overrides.h" namespace pk { --- a/src/model_loader.cpp +++ b/src/model_loader.cpp @@ -10,6 +10,7 @@ #include #include #include +#include "moz-overrides.h" namespace pk { int PromptCfg::resolve_index_or_throw(const std::string& target_lang) const { --- a/src/parakeet_capi.cpp +++ b/src/parakeet_capi.cpp @@ -1,11 +1,4 @@ #include "parakeet_capi.h" -#include "parakeet.h" // pk::Decoder -#include "model.hpp" // pk::Model -#include "streaming.hpp" // pk::StreamingSession -#include "mel.hpp" // pk::MelFrontend - -#include "transcription.hpp" // pk::Transcription, pk::Word - #include #include #include @@ -14,7 +7,14 @@ #include #include #include +#include "parakeet.h" // pk::Decoder +#include "model.hpp" // pk::Model +#include "streaming.hpp" // pk::StreamingSession +#include "mel.hpp" // pk::MelFrontend +#include "transcription.hpp" // pk::Transcription, pk::Word +#include "moz-overrides.h" + // ABI version. Bump on breaking changes. // v3: target_lang variants (transcribe_path_lang / transcribe_pcm_lang / // stream_begin_lang / transcribe_pcm_batch_json_lang /