aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2017-12-26 19:44:08 -0500
committerAndrew Kelley <superjoe30@gmail.com>2017-12-26 19:44:08 -0500
commit6fece14cfbb852c108c2094ae0879da76f2f445e (patch)
treec2cde629583a94556d65dbc376e0809124550828 /src/main.cpp
parent2a25398c869fcdefe8b6508974a5c463ca833520 (diff)
downloadzig-6fece14cfbb852c108c2094ae0879da76f2f445e.tar.gz
zig-6fece14cfbb852c108c2094ae0879da76f2f445e.zip
self-hosted: build against zig_llvm and embedded LLD
Now the self-hosted compiler re-uses the same C++ code for interfacing with LLVM as the C++ code. It also links against the same LLD library files.
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 60d2750bde..66ffbbde82 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -266,6 +266,11 @@ static void add_package(CodeGen *g, CliPkg *cli_pkg, PackageTableEntry *pkg) {
}
int main(int argc, char **argv) {
+ if (argc == 2 && strcmp(argv[1], "BUILD_INFO") == 0) {
+ printf("%s\n%s\n", ZIG_CMAKE_BINARY_DIR, ZIG_CXX_COMPILER);
+ return 0;
+ }
+
os_init();
char *arg0 = argv[0];