1
1
mirror of https://github.com/rui314/mold.git synced 2024-11-13 09:39:13 +03:00

Print out an error message if mold -run is used on macOS

This commit is contained in:
Rui Ueyama 2022-06-09 10:35:20 -07:00
parent 6f9eedf98a
commit 8f02509ba6

View File

@ -82,6 +82,11 @@ static std::string find_dso(Context<E> &ctx, std::filesystem::path self) {
template <typename E>
[[noreturn]]
void process_run_subcommand(Context<E> &ctx, int argc, char **argv) {
#ifdef __APPLE__
// LD_PRELOAD is not supported on macOS
Fatal(ctx) << "mold -run is not supported on macOS";
#endif
std::string_view arg1 = argv[1];
assert(arg1 == "-run" || arg1 == "--run");
if (!argv[2])