mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 21:20:11 +01:00
I think this will work on linux/mac, not windows obviously. But the essence is that running `bazel run -c opt //installers/local:install` will create: Symlink: /usr/bin/carbon-explorer -> /usr/lib/carbon/carbon BusyBox-style binary: /usr/lib/carbon/carbon File: /usr/lib/carbon/data/prelude.carbon And then just running `carbon-explorer foo.carbon` with no flags (in particular, not --prelude) will work. Since this removes the need for prelude_file in most cases, I'm removing the relative path logic added in #1179 -- it would otherwise conflict with what I'm doing here. I *think* overall this will result in something even simpler and more reliable for compiler explorer to use, and hopefully with enough flexibility that it's easy for us to change how it's implemented later without breaking much.
12 lines
435 B
C++
12 lines
435 B
C++
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
|
// Exceptions. See /LICENSE for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
|
#include "executable_semantics/main.h"
|
|
|
|
auto main(int argc, char** argv) -> int {
|
|
// This assumes execution from bazel, in runfiles.
|
|
return Carbon::ExecutableSemanticsMain(
|
|
"executable_semantics/data/prelude.carbon", argc, argv);
|
|
}
|