fix: don't crash on startup on macOS
This is caused, through several layers of absurdity, by runtime type information of Nix things being invisible due to -fvisibility=hidden inside n-e-j. We don't have any idea why n-e-j has -fvisibility=hidden, since blame says it's from the initial commit. It is plausible that it was some ill-advised optimization but it's not sound. The crash is caused by dynamic_cast<RootArgs *>(MyArgs *) failing, which is in turn caused by the RTTI being invisible. See: https://www.qt.io/blog/quality-assurance/one-way-dynamic_cast-across-library-boundaries-can-fail-and-how-to-fix-it Fixes: #2
This commit is contained in:
parent
13524829d1
commit
30cf61fd26
|
@ -12,7 +12,7 @@
|
|||
|
||||
class MyArgs : virtual public nix::MixEvalArgs,
|
||||
virtual public nix::MixCommonArgs,
|
||||
virtual nix::RootArgs {
|
||||
virtual public nix::RootArgs {
|
||||
public:
|
||||
std::string releaseExpr;
|
||||
nix::Path gcRootsDir;
|
||||
|
|
|
@ -31,4 +31,4 @@ executable('nix-eval-jobs', src,
|
|||
threads_dep
|
||||
],
|
||||
install: true,
|
||||
cpp_args: ['-std=c++2a', '-fvisibility=hidden', '--include', 'autotools-config.h'])
|
||||
cpp_args: ['-std=c++2a', '--include', 'autotools-config.h'])
|
||||
|
|
Loading…
Reference in a new issue