aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
AgeCommit message (Collapse)Author
2020-06-08Add option for overriding the stack sizeJakub Konka
This commit adds a `--stack [size]` link-time option to zig compiler allowing the user to override the default stack size set for the specified executable/library format. This is currently limited to ELF, COFF and Wasm however (i.e., Mach-O is excluded).
2020-04-26add CLI option -Bsymbolic for binding global references locallyAndrew Kelley
2020-04-15CC: fix binary dupe with no -oLayne Gustafson
2020-04-14cli: add `c++` subcommand to --help menuAndrew Kelley
closes #5034
2020-04-12Zig treats -lstdc++ identically to -lc++Andrew Kelley
Thanks to Michael Dusan for figuring out what was happening here. closes #5012
2020-04-06zig cc: recognize a few more linker optionsAndrew Kelley
* `--major-image-version` * `--minor-image-version` * `--stack`
2020-04-04zig cc looks for native include directories unless -nostdincAndrew Kelley
closes #4938
2020-04-04remove `zig BUILD_INFO` hackAndrew Kelley
Rather than stuffing configuration information into the Zig binary, the build script reads it from config.h. This solves a problem for package maintainers and improves the use case of deterministic builds. closes #3758
2020-04-03zig cc: add -allow-shlib-undefined aliasAndrew Kelley
2020-04-02zig cc: support more linker argsAndrew Kelley
2020-04-02zig cc: support --version-script linker argAndrew Kelley
See #4784
2020-04-02zig cc: support -F and -frameworkAndrew Kelley
2020-04-02zig cc: respect -MF -MV -MD optionsAndrew Kelley
Zig disables its caching and forwards these args when any are provided. see #4784
2020-04-01zig cc: detect -mcpu, -march, -mtuneAndrew Kelley
However these are all treated like zig's -mcpu parameter. See #4784
2020-04-01zig cc: add support for -L linker argumentsRejean Loyer
2020-04-01zig cc properly handles -S flag and .ll, .bc extensionsAndrew Kelley
2020-03-30revert detection of rtti and exceptionsAndrew Kelley
This caused link errors in c++ code because it was not correct to pass these flags to child codegens. And that was the only reason to detect these flags. Otherwise we can safely rely on non-explicitly-detected flag forwarding.
2020-03-29linking against c++ does not trigger system library directoriesAndrew Kelley
2020-03-29zig cc: -O0 also counts as debug modeAndrew Kelley
2020-03-28zig cc: Add support for -zRyan Liptak
This is only the first step; it makes zig cc recognize -z and append it to the linker args, but the linker arg parsing doesn't support -z yet so it will just give the warning 'unsupported linker arg: -z'
2020-03-27zig cc: Add support for -Xlinker, --for-linker, --for-linker=Ryan Liptak
2020-03-28Merge pull request #4835 from squeek502/export-dynamicAndrew Kelley
-rdynamic/--export-dynamic fixes
2020-03-27zig cc: Add --export-dynamic linker flag supportRyan Liptak
2020-03-27zig c++: get it working with musl and mingw-w64Andrew Kelley
2020-03-26ability to compile c++ hello world with `zig c++`Andrew Kelley
closes #4786
2020-03-25improved handling of native system directoriesAndrew Kelley
* `-isystem` instead of `-I` for system include directories fixes a problem with native system directories interfering with zig's bundled libc. * separate Stage2Target.is_native into Stage2Target.is_native_os and Stage2Target.is_native_cpu.
2020-03-25zig cc: add detection for `-###`Andrew Kelley
it turns on --verbose-cc and --verbose-link
2020-03-25zig cc: freestanding target implies -nostdlibAndrew Kelley
2020-03-25zig cc: support -T linker script optionAndrew Kelley
2020-03-24Merge remote-tracking branch 'origin/llvm10'Andrew Kelley
LLVM 10 was released today
2020-03-23zig cc: detect dynamic linker argumentAndrew Kelley
2020-03-23zig cc: recognize .S and .C as source file extensionsAndrew Kelley
2020-03-22Merge remote-tracking branch 'origin/master' into llvm10Andrew Kelley
2020-03-22Merge remote-tracking branch 'origin/master' into llvm10Andrew Kelley
2020-03-21zig cc: detect optimization and debug flagsAndrew Kelley
2020-03-21zig cc: better support for the preprocessor option (-E)Andrew Kelley
2020-03-21rename "passthrough" → "driver_punt"Michael Dusan
- punt when `-E` is supplied - punt when `-S` is supplied
2020-03-21zig cc: support .cc and .cxx extensionsAndrew Kelley
2020-03-21zig cc improvementsAndrew Kelley
* The generated options data file is sorted now in a way that makes sure longer prefixes are first. This prevents collisions with some parameters. * Add support for `-fPIC`, `-fno-PIC`, `-nostdlib`, `-shared`, `-rdynamic`, `-Wl,-soname`, `-Wl,-rpath` * Better support for `-o`. * Disable generating h files * Shared library support. * Better positional argument support.
2020-03-21ability to use `zig cc` as a drop-in C compilerAndrew Kelley
The basics are working
2020-03-20"generate .h files" feature is no longer supported in stage1Andrew Kelley
2020-03-19Merge remote-tracking branch 'origin/master' into llvm10Andrew Kelley
2020-03-13zig build system: correctly handle multiple output artifactsAndrew Kelley
Previously the zig build system incorrectly assumed that the only build artifact was a binary. Now, when you enable the cache, only the output dir is printed to stdout, and the zig build system iterates over the files in that directory, copying them to the output directory. To support this change: * Add `std.os.renameat`, `std.os.renameatZ`, and `std.os.renameatW`. * Fix `std.os.linux.renameat` not compiling due to typos. * Deprecate `std.fs.updateFile` and `std.fs.updateFileMode`. * Add `std.fs.Dir.updateFile`, which supports using open directory handles for both the source and destination paths, as well as an options parameter which allows overriding the mode. * Update `std.fs.AtomicFile` to support operating based on an open directory handle. Instead of `std.fs.AtomicFile.init`, use `std.fs.Dir.atomicFile`. * `std.fs.AtomicFile` deinit() better handles the situation when the rename fails but the temporary file still exists, by still attempting to remove the temporary file. * `std.fs.Dir.openFileWindows` is moved to `std.os.windows.OpenFileW`. * `std.os.RenameError` gains the error codes `NoDevice`, `SharingViolation`, and `PipeBusy` which have been observed from Windows. Closes #4733
2020-03-13Fix compilation with `--no-emit-bin`Noam Preil
2020-03-13Merge remote-tracking branch 'origin/master' into llvm10Andrew Kelley
2020-03-12fix `zig targets` not reporting native infoAndrew Kelley
2020-03-03Merge remote-tracking branch 'origin/master' into llvm10Andrew Kelley
2020-02-28dynamic_linker becomes a field of std.zig.CrossTargetAndrew Kelley
2020-02-28remove special darwin os version min handlingAndrew Kelley
now it is integrated with zig's target OS range.
2020-02-28stage1: make get_native_target go through self-hostedAndrew Kelley