main_bin.cpp 634 B

1234567891011121314151617
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. #include "common/bazel_working_dir.h"
  5. #include "explorer/main.h"
  6. auto main(int argc, char** argv) -> int {
  7. Carbon::SetWorkingDirForBazel();
  8. static int static_for_main_addr;
  9. return Carbon::ExplorerMain(
  10. argc, argv, static_cast<void*>(&static_for_main_addr),
  11. // This assumes execution from `bazel-bin/explorer`, either directly or
  12. // with `bazel run`.
  13. "explorer.runfiles/_main/explorer/data/prelude.carbon");
  14. }