Commit Graph
2 Commits
Author SHA1 Message Date
Jon Meow b4852b04d2 Make bazel run use the build working dir (#1198)
╚╡bazel run :executable_semantics -- testdata/basic_syntax/print.carbon
INFO: Invocation ID: e7820b06-f118-45c7-afdb-b3a3f526ffcf
INFO: Analyzed target //executable_semantics:executable_semantics (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
Target //executable_semantics:executable_semantics up-to-date:
bazel-bin/executable_semantics/executable_semantics
INFO: Elapsed time: 0.466s, Critical Path: 0.01s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
INFO: Running command line: bazel-bin/executable_semantics/executable_semantics
INFO: Build completed successfully, 1 total action
Hello world!
result: 0
2022-04-20 10:09:52 -07:00
Jon Meow 0948582023 Add install scripts (#1186)
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.
2022-04-14 10:53:46 -07:00