Skip to content

Commit

Permalink
Remove useless debug statements
Browse files Browse the repository at this point in the history
We haven't parsed the '-v' command line flags yet when this code executes,
so we can't actually get debug output here.
  • Loading branch information
edolstra committed Oct 14, 2022
1 parent ddd5503 commit 285277a
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/libstore/globals.cc
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,9 @@ StringSet Settings::getDefaultExtraPlatforms()
// machines. Note that we can’t force processes from executing
// x86_64 in aarch64 environments or vice versa since they can
// always exec with their own binary preferences.
if (std::string{SYSTEM} == "aarch64-darwin") {
if (runProgram(RunOptions {.program = "arch", .args = {"-arch", "x86_64", "/usr/bin/true"}, .mergeStderrToStdout = true}).first == 0) {
debug("Rosetta detected");
extraPlatforms.insert("x86_64-darwin");
} else
debug("Rosetta not detected");
}
if (std::string{SYSTEM} == "aarch64-darwin" &&
runProgram(RunOptions {.program = "arch", .args = {"-arch", "x86_64", "/usr/bin/true"}, .mergeStderrToStdout = true}).first == 0)
extraPlatforms.insert("x86_64-darwin");
#endif

return extraPlatforms;
Expand Down

0 comments on commit 285277a

Please sign in to comment.