24 options.force_assert_statements =
false;
26 std::vector<std::string> files;
28 for (
int i = 1;
i < argc; ++
i) {
30 std::string argument(argv[
i]);
31 if (argument ==
"-o") {
32 options.output_directory = argv[++
i];
33 }
else if (argument ==
"-v8-root") {
34 options.v8_root = std::string(argv[++
i]);
35 }
else if (argument ==
"-m32") {
36#ifdef V8_COMPRESS_POINTERS
37 std::cerr <<
"Pointer compression is incompatible with -m32.\n";
40 options.force_32bit_output =
true;
42 }
else if (argument ==
"-annotate-ir") {
43 options.annotate_ir =
true;
44 }
else if (argument ==
"-strip-v8-root") {
45 options.strip_v8_root =
true;
49 if (options.strip_v8_root &&
50 argument.substr(0, options.v8_root.size()) == options.v8_root) {
51 argument = argument.substr(options.v8_root.size() + 1);
54 files.emplace_back(std::move(argument));
56 std::cerr <<
"Unexpected command-line argument \"" << files.back()
57 <<
"\", expected a .tq file.\n";
70 if (message.position) {
74 std::cerr <<
ErrorPrefixFor(message.kind) <<
": " << message.message