aboutsummaryrefslogtreecommitdiff
path: root/src/clang_options_data.zig
AgeCommit message (Collapse)Author
2022-08-19stage2: implement stack protectorsAndrew Kelley
This is one of the final remaining TODOs for the LLVM backend.
2022-08-08cc: add support for -M flagJakub Konka
2022-07-11stage2: cleanups to --compress-debug-sectionsAndrew Kelley
* make the setting in the linker backend be non-optional; by this time all defaults are supposed to be resolved. * integrate with `zig cc` * change the CLI parsing to match C compiler parsing, allowing `--compress-debug-sections` alone to choose a default encoding of zlib.
2022-07-05CLI: add support for -fno-builtinAndrew Kelley
2022-07-03Merge remote-tracking branch 'origin/master' into llvm14Andrew Kelley
2022-07-03clang: parse --verbose flag as -vJakub Konka
2022-07-01update clang command line options to LLVM 14Andrew Kelley
2022-06-29clang: add Zig equivalent for -headerpad_max_install_names cli flagJakub Konka
2022-06-28clang: update cmdline options to include weak libs and frameworksJakub Konka
Clang accepts `-weak-lx`, `-weak_library x` and `-weak_framework x`.
2022-03-04zig cc: integrate with -fstack-check, -fno-stack-checkAndrew Kelley
2022-01-19stage2: improvements to entry point handlingAndrew Kelley
* rename `entry` to `entry_symbol_name` for the zig build API * integrate with `zig cc` command line options * integrate with COFF linking with LLD * integrate with self-hosted ELF linker * don't put it in the hash for MachO since it is ignored
2022-01-11zig cc: integration with sysroot arg (#10568)Jakub Konka
Prior to this change, even if the use specified the sysroot on the compiler line like so ``` zig cc --sysroot=/path/to/sdk ``` it would only be used as a prefix to include paths and not as a prefix for `zig ld` linker.
2021-11-26zig cc: honor all -m and -mno- CPU feature flagsAndrew Kelley
closes #9196
2021-11-21zig cc: add -fcolor-diagnostics and -fcaret-diagnostics integrationAndrew Kelley
Closes #6290
2021-11-21zig cc: add -ffunction-sections integrationAndrew Kelley
Also update to latest LLVM 13 command line options. See #6290
2021-10-16Add build.zig and command line flagsLee Cannon
2021-09-16zig cc: support -S and -emit-llvm CLI parametersAndrew Kelley
closes #6425
2021-09-01stage2: update for new usingnamespace semanticsAndrew Kelley
2021-06-11zig cc: recognize more pie flagsAndrew Kelley
This is a bug fix.
2021-06-11better awareness of unwind tablesAndrew Kelley
* stage1 backend allows configuring the uwtables function attr via a flag rather than its own logic. * stage2 defaults to enabling uwtable attr when linking libunwind, or always on windows * stage2 makes link_eh_frame_hdr true automatically if uwtable attr is set to be on for zig functions * CLI: add -funwind-tables and -fno-unwind-tables to allow the user to override the defaults. * hook it up to `zig cc` closes #9046
2021-06-09cc,wasi: support WASI reactors via -mexec-model flag.Takeshi Yoneda
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
2021-03-28Merge remote-tracking branch 'origin/master' into llvm12Andrew Kelley
2021-03-14macho: fix various linker flagsMichael Dusan
fix drivers: zig {cc,c++} - `-dynamiclib` is an alias to `-shared` - associate `-dynamiclib` with zig `.shared` semantics fix drivers: zig {cc,c++,build-lib,build-exe} - use `-dynamic` for {exe,dylib} - for dylib this fixes a regression - for exe this replaces incorrect use of `-static`
2021-03-04Merge remote-tracking branch 'origin/master' into llvm12Andrew Kelley
Syncing with master branch because I want to re-run update_clang_options.zig in the llvm12 branch.
2021-03-04zig cc: fix handling of -MM flagAndrew Kelley
Clang docs say: > Like -MMD, but also implies -E and writes to stdout by default. Previously, Zig handled this option by forwarding it directly to Clang, and disabling depfiles. However this did not adhere to Clang's documented behavior of these flags. Now, in addition to being forwarded directly to Clang, `-MM` also sets c_out_mode = .preprocessor, just like `-E`. Another issue I noticed is that Zig did not recognize the aliases for -MG, -MM, or -MMD. The aliases are now recognized.
2021-02-26zig cc: update clang command line options to LLVM 12 rc2Andrew Kelley
2021-02-25Merge remote-tracking branch 'origin/master' into llvm12Andrew Kelley
Conflicts: * src/clang.zig * src/llvm.zig - this file got moved to src/llvm/bindings.zig in master branch so I had to put the new LLVM arch/os enum tags into it. * lib/std/target.zig, src/stage1/target.cpp - haiku had an inconsistency with its default target ABI, gnu vs eabi. In this commit we make it gnu in both places to match the latest changes by @hoanga. * src/translate_c.zig
2021-02-07zig cc: recognize the `-s` flag to be "strip"Andrew Kelley
2021-01-23add LTO supportAndrew Kelley
The CLI gains -flto and -fno-lto options to override the default. However, the cool thing about this is that the defaults are great! In general when you use build-exe in release mode, Zig will enable LTO if it would work and it would help. zig cc supports detecting and honoring the -flto and -fno-lto flags as well. The linkWithLld functions are improved to all be the same with regards to copying the artifact instead of trying to pass single objects through LLD with -r. There is possibly a future improvement here as well; see the respective TODOs. stage1 is updated to support outputting LLVM bitcode instead of machine code when lto is enabled. This allows LLVM to optimize across the Zig and C/C++ code boundary. closes #2845
2021-01-11stage2: cleanups regarding red zone CLI flagsAndrew Kelley
* CLI: change to -mred-zone and -mno-red-zone to match gcc/clang. * build.zig: remove the double negative and make it an optional bool. This follows precedent from other flags, allowing the compiler CLI to be the decider of what is default instead of duplicating the default value into the build system code. * Compilation: make it an optional `want_red_zone` instead of a `no_red_zone` bool. The default is decided by a call to `target_util.hasRedZone`. * When creating a Clang command line, put -mred-zone on the command line if we are forcing it to be enabled. * Update update_clang_options.zig with respect to the recent {s}/{} format changes. * `zig cc` integration with red zone preference.
2020-12-16Update clang optionsJakub Konka
llvm commit b2851aea80e5a8f0cfd6c3c5a56a6b00fb28c6b6
2020-11-22modernize the PIE patch for the latest master branchAndrew Kelley
This is the part of #3960 that has to be rewritten to apply to latest master branch code.
2020-11-19stage2: Make zig cc more verbose (#7166)LemonBoy
* stage2: Make zig cc more verbose Make `zig cc` print more info from Clang itself and from our own linker invocation, this is needed for CMake to properly discover all the include directories and library search paths. Closes #7110 * Update `update_clang_options` * Typo fixes Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
2020-10-08run update_clang_options on llvm 11 rc6Andrew Kelley
2020-10-08Merge remote-tracking branch 'origin/master' into llvm11Andrew Kelley
Conflicts: src/clang.zig Master branch renamed an enum; this branch gave it an explicit tag type and explicitly initialized values. This commit combines the changes together.
2020-10-07notice more kinds of optimization flags and debug flagsxavier
Closes #6091
2020-09-30Merge remote-tracking branch 'origin/master' into llvm11Andrew Kelley
The changes to install_files.h needed to put into src/libcxx.zig
2020-09-25stage2: properly handle zig cc used as a preprocessorAndrew Kelley
This cleans up how the CLI parses and handles -E, -S, and -c. Compilation explicitly acknowledges when it is being used to do C preprocessing. -S is properly translated to -fno-emit-bin -femit-asm but Compilation does not yet handle -femit-asm. There is not yet a mechanism for skipping the linking step when there is only a single object file, and so to make this work we have to do a file copy in link.flush() to copy the file from zig-cache into the output directory.
2020-09-21rename src-self-hosted/ to src/Andrew Kelley