mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 08:16:15 +02:00
Narrower scope for nativeSystem
I don't think we need a CPP defininition and a header entry, and this way allows constant expression elimination.
This commit is contained in:
parent
8e222fbb12
commit
2678b51b31
3 changed files with 2 additions and 8 deletions
|
@ -1620,6 +1620,8 @@ void setupSeccomp()
|
|||
seccomp_release(ctx);
|
||||
});
|
||||
|
||||
constexpr std::string_view nativeSystem = SYSTEM;
|
||||
|
||||
if (nativeSystem == "x86_64-linux" &&
|
||||
seccomp_arch_add(ctx, SCMP_ARCH_X86) != 0)
|
||||
throw SysError("unable to add 32-bit seccomp architecture");
|
||||
|
|
|
@ -7,8 +7,6 @@
|
|||
|
||||
namespace nix {
|
||||
|
||||
const std::string nativeSystem = SYSTEM;
|
||||
|
||||
void BaseError::addTrace(std::shared_ptr<AbstractPos> && e, hintformat hint, bool frame)
|
||||
{
|
||||
err.traces.push_front(Trace { .pos = std::move(e), .hint = hint, .frame = frame });
|
||||
|
|
|
@ -34,12 +34,6 @@ struct Source;
|
|||
|
||||
void initLibUtil();
|
||||
|
||||
/**
|
||||
* The system for which Nix is compiled.
|
||||
*/
|
||||
extern const std::string nativeSystem;
|
||||
|
||||
|
||||
/**
|
||||
* @return an environment variable.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue