Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion bin/Index/Importer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,8 @@ static const std::string_view kMLLVM("-mllvm");
static bool IsOptNeedingFixing(std::string_view arg) {
return arg == kOptNoStdInc || arg == kOptNoStdIncxx ||
arg == kOptNoBuiltinInc || arg == kOptNoStdSystemInc ||
arg.starts_with("-fsanitize=");
arg.starts_with("-fsanitize=") ||
arg.starts_with("-mrelocation-model");
}

static bool IsOpt1NeedingFixing(std::string_view arg) {
Expand Down
13 changes: 12 additions & 1 deletion bin/Index/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ DEFINE_string(workspace, "mx-workspace",

DEFINE_bool(generate_sourceir, false, "Generate SourceIR from the top-level declarations");

DEFINE_bool(fork_mode, false, "Use --fork_mode if running inside docker");
DEFINE_bool(reproc_mode, false, "Use --reproc_mode to use reproc library");

namespace {

std::unique_ptr<llvm::MemoryBuffer>
Expand Down Expand Up @@ -165,6 +168,8 @@ int main(int argc, char *argv[], char *envp[]) {
<< " [--env PATH_TO_COPIED_ENV_VARS]\n"
<< " [--show_progress]\n"
<< " [--generate_sourceir]\n"
<< " --fork_mode\n"
<< " --reproc_mode\n"
<< " --db DATABASE\n"
<< " --workspace INDEXER_WORKSPACE_DIR\n"
<< " --target COMPILE_COMMANDS\n";
Expand All @@ -187,7 +192,13 @@ int main(int argc, char *argv[], char *envp[]) {
if (FLAGS_target.empty()) {
std::cerr
<< "Must specify a path to a target file to import with --target. "
"Use - or /dev/stdin to read from stdin.";
"Use - or /dev/stdin to read from stdin.\n";
return EXIT_FAILURE;
}

if (!FLAGS_reproc_mode && !FLAGS_fork_mode) {
std::cerr
<< "Must specify --reproc_mode or --fork_mode\n";
return EXIT_FAILURE;
}

Expand Down
Loading