summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver/split-debug.c
Commit message (Collapse)AuthorAgeFilesLines
* [DWARF5][SplitDwarf] Set default state for -fsplit-dwarf-inlining to be false.Alexey Lapshin2019-12-111-1/+4
| | | | | | | | | The -fsplit-dwarf-inlining option does not conform to DWARF5 standard. It creates children for Skeleton compilation unit. We need default behavior to be DWARF5 compatible. Thus set default state for -fsplit-dwarf-inlining into "false". Differential Revision: https://reviews.llvm.org/D71304
* [Clang] Remove unused -split-dwarf and obsolete -enable-split-dwarfAaron Puchert2019-06-261-10/+2
| | | | | | | | | | | | | | | | | | | | | | Summary: The changes in D59673 made the choice redundant, since we can achieve single-file split DWARF just by not setting an output file name. Like llc we can also derive whether to enable Split DWARF from whether -split-dwarf-file is set, so we don't need the flag at all anymore. The test CodeGen/split-debug-filename.c distinguished between having set or not set -enable-split-dwarf with -split-dwarf-file, but we can probably just always emit the metadata into the IR. The flag -split-dwarf wasn't used at all anymore. Reviewers: dblaikie, echristo Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D63167 llvm-svn: 364479
* [Clang] Harmonize Split DWARF options with llcAaron Puchert2019-06-151-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: With Split DWARF the resulting object file (then called skeleton CU) contains the file name of another ("DWO") file with the debug info. This can be a problem for remote compilation, as it will contain the name of the file on the compilation server, not on the client. To use Split DWARF with remote compilation, one needs to either * make sure only relative paths are used, and mirror the build directory structure of the client on the server, * inject the desired file name on the client directly. Since llc already supports the latter solution, we're just copying that over. We allow setting the actual output filename separately from the value of the DW_AT_[GNU_]dwo_name attribute in the skeleton CU. Fixes PR40276. Reviewers: dblaikie, echristo, tejohnson Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D59673 llvm-svn: 363496
* [Clang] Rename -split-dwarf-file to -split-dwarf-outputAaron Puchert2019-06-151-12/+12
| | | | | | | | | | | | | | | | | | Summary: This is the first in a series of changes trying to align clang -cc1 flags for Split DWARF with those of llc. The unfortunate side effect of having -split-dwarf-output for single file Split DWARF will disappear again in a subsequent change. The change is the result of a discussion in D59673. Reviewers: dblaikie, echristo Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D63130 llvm-svn: 363494
* [Driver] Simplify -g level computation and its interaction with -gsplit-dwarfFangrui Song2019-04-171-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: When -gsplit-dwarf is used together with other -g options, in most cases the computed debug info level is decided by the last -g option, with one special case (see below). This patch drops that special case and thus makes it easy to reason about: // If a lower debug level -g comes after -gsplit-dwarf, in some cases // -gsplit-dwarf is cancelled. -gsplit-dwarf -g0 => 0 -gsplit-dwarf -gline-directives-only => DebugDirectivesOnly -gsplit-dwarf -gmlt -fsplit-dwarf-inlining => 1 -gsplit-dwarf -gmlt -fno-split-dwarf-inlining => 1 + split // If -gsplit-dwarf comes after -g options, with this patch, the net // effect is 2 + split for all combinations -g0 -gsplit-dwarf => 2 + split -gline-directives-only -gsplit-dwarf => 2 + split -gmlt -gsplit-dwarf -fsplit-dwarf-inlining => 2 + split -gmlt -gsplit-dwarf -fno-split-dwarf-inlining => 1 + split (before) 2 + split (after) The last case has been changed. In general, if the user intends to lower debug info level, place that -g option after -gsplit-dwarf. Some context: In gcc, the last of -gsplit-dwarf -g0 -g1 -g2 -g3 -ggdb[0-3] -gdwarf-* ... decides the debug info level (-gsplit-dwarf -gdwarf-* have level 2). It is a bit unfortunate that -gsplit-dwarf -gdwarf-* ... participate in the level computation but that is the status quo. Reviewers: dblaikie, echristo, probinson Reviewed By: dblaikie, probinson Subscribers: probinson, aprantl, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59923 llvm-svn: 358544
* [AMDGPU] Switch default DWARF version to 5Scott Linder2019-03-291-0/+3
| | | | | | | | | Effectively reverts r337612. The issues that cropped up with the last attempt appear to have gone away. Differential Revision: https://reviews.llvm.org/D59008 llvm-svn: 357285
* [Driver] Allow -gsplit-dwarf on ELF OSes other than Linux and FuchsiaFangrui Song2019-03-281-0/+3
| | | | | | | | | | | In gcc, -gsplit-dwarf is handled in gcc/gcc.c as a spec (ASM_FINAL_SPEC): objcopy --extract-dwo + objcopy --strip-dwo. In gcc/opts.c, -gsplit_dwarf has the same semantic of a -g. Except for the availability of the external command 'objcopy', nothing precludes the feature working on other ELF OSes. llvm doesn't use objcopy, so it doesn't have to exclude other OSes. llvm-svn: 357150
* [Clang] - Add '-gsplit-dwarf[=split,=single]' version for '-gsplit-dwarf' ↵George Rimar2018-11-141-0/+15
| | | | | | | | | | | | | | | | | | | | option. The DWARF5 specification says(Appendix F.1): "The sections that do not require relocation, however, can be written to the relocatable object (.o) file but ignored by the linker or they can be written to a separate DWARF object (.dwo) file that need not be accessed by the linker." The first part describes a single file split DWARF feature and there is no way to trigger this behavior atm. Fortunately, no many changes are required to keep *.dwo sections in a .o, the patch does that. Differential revision: https://reviews.llvm.org/D52296 llvm-svn: 346837
* Reland r332885, "CodeGen, Driver: Start using direct split dwarf emission in ↵Peter Collingbourne2018-05-221-2/+1
| | | | | | | | | clang." As well as two follow-on commits r332906, r332911 with a fix for test clang/test/CodeGen/split-debug-filename.c. llvm-svn: 333013
* Revert "CodeGen, Driver: Start using direct split dwarf emission in clang."Amara Emerson2018-05-221-1/+2
| | | | | | This reverts commit r332885 as it broke several greendragon buildbots. llvm-svn: 332973
* CodeGen, Driver: Start using direct split dwarf emission in clang.Peter Collingbourne2018-05-211-2/+1
| | | | | | | | Fixes PR37466. Differential Revision: https://reviews.llvm.org/D47093 llvm-svn: 332885
* Enable -fno-split-dwarf-inlining even when -gsplit-dwarf isn't specified.David Blaikie2017-04-281-0/+7
| | | | | | | | | | | | | | Since -gsplit-dwarf is specified on a backend compile (in ThinLTO parlance) it isn't passed during the frontend compile (because no ELF object/dwo file is produced then), yet the -fno-split-dwarf-inlining value needs to be encoded in the LLVM DebugInfo metadata to have effect... So let it be specified & it'll be silently ignored if -gsplit-dwarf isn't used in the end, otherwise it'll be used on a per-cu basis depending on where it's specified in the frontend compile actions. llvm-svn: 301684
* Move Split DWARF handling to an MC option/command line argument rather than ↵David Blaikie2017-04-211-8/+8
| | | | | | | | | | | | | | | | | | | using metadata Since Split DWARF needs to name the actual .dwo file that is generated, it can't be known at the time the llvm::Module is produced as it may be merged with other Modules before the object is generated and that object may be generated with any name. By passing the Split DWARF file name when LLVM is producing object code the .dwo file name in the object file can match correctly. The support for Split DWARF for implicit modules remains the same - using metadata to store the dwo name and dwo id so that potentially multiple skeleton CUs referring to different dwo files can be generated from one llvm::Module. llvm-svn: 301063
* DebugInfo: Fix -gsplit-dwarf + -fno-split-dwarf-inliningDavid Blaikie2016-08-311-0/+7
| | | | | | | | | | | I tested the cases involving split-dwarf + gmlt + no-split-dwarf-inlining, but didn't verify the simpler case without gmlt. The logic is, admittedly, a little hairy, but seems about as simple as I could wrangle it. llvm-svn: 280290
* DebugInfo: Let -gsplit-dwarf and -gmlt compose if -fno-split-dwarf-inlining ↵David Blaikie2016-08-241-2/+23
| | | | | | | | | | | is used If the inline info is not duplicated into the skeleton CU, then there's value in using -gsplit-dwarf and -gmlt together (to keep all those extra subprograms out of the skeleton CU, while also producing smaller .dwo files) llvm-svn: 279687
* Driver part of debugger tuning.Paul Robinson2015-12-191-0/+13
| | | | | | | | | | | | | | | | Adds driver options named -glldb and -gsce to mean -g plus tuning for lldb and SCE debuggers respectively; the existing -ggdb option does the same for gdb. Existing options -ggdb0, -ggdb1 etc. unpack into -ggdb -g<N>. (There will not be -glldb<N> or -gsce<N> options.) The tuning gets a target-specific default in the driver, and is passed into cc1 with the new -debugger-tuning option. As fallout, fixes where '-gsplit-dwarf -g0' would ignore the -g0 part on Linux. Differential Revision: http://reviews.llvm.org/D15651 llvm-svn: 256104
* Stop messing with the 'g' group of options in CompilerInvocation.Douglas Katzman2015-10-081-6/+2
| | | | | | | | | | | | | | | | With this change, most 'g' options are rejected by CompilerInvocation. They remain only as Driver options. The new way to request debug info from cc1 is with "-debug-info-kind={line-tables-only|limited|standalone}" and "-dwarf-version={2|3|4}". In the absence of a command-line option to specify Dwarf version, the Toolchain decides it, rather than placing Toolchain-specific logic in CompilerInvocation. Also fix a bug in the Windows compatibility argument parsing in which the "rightmost argument wins" principle failed. Differential Revision: http://reviews.llvm.org/D13221 llvm-svn: 249655
* Split DWARF: Allow -gmlt/-gsplit-dwarf to override rather than complement ↵David Blaikie2015-07-301-0/+17
| | | | | | | | | | | | | | each other It doesn't make any sense to enable -gmlt with -gsplit-dwarf, since -gmlt is designed for on-line symbolication (and -gsplit-dwarf normally emits all the -gmlt data into the .o anyway - so there's nothing to split out except redundant/duplicate info). With this change they override each other, -gmlt -gsplit-dwarf is the same as -gsplit-dwarf and -gsplit-dwarf -gmlt is the same as -gmlt. llvm-svn: 243694
* clang/test/Driver: Some tests don't REQUIRE asserts any more. Remove them.NAKAMURA Takumi2014-10-121-1/+0
| | | | llvm-svn: 219580
* If we're splitting the dwarf for fission and don't want to use theEric Christopher2013-06-051-0/+10
| | | | | | | | | | integrated assembler then go ahead and still split the dwarf anyhow. Add two tests, one to exercise existing behavior of not splitting when we're just emitting assembly files and the other to test that we split when we're not in integrated as mode. llvm-svn: 183355
* Split out the command handling for split debug info, we're goingEric Christopher2013-02-221-0/+5
| | | | | | | | | to want to propagate some information through the module into the back end and so need to pass it through to codegen. Also make the methods file static so we can use them in other places. llvm-svn: 175916
* Make sure we only use the output file as a base for debug splittingEric Christopher2013-02-221-0/+6
| | | | | | if we're compiling. llvm-svn: 175851
* Don't pass -split-dwarf= to the backend unless we're on linux forEric Christopher2013-02-211-0/+4
| | | | | | now. llvm-svn: 175814
* Remove the SplitDebug action and replace with a set of commandsEric Christopher2013-02-211-12/+3
| | | | | | | in the compilation setup. Note that this doesn't currently work for -no-integrated-as. llvm-svn: 175813
* Driver and option support for -gsplit-dwarf. This is a part ofEric Christopher2013-02-051-0/+19
the DWARF5 split dwarf proposal. llvm-svn: 174349
OpenPOWER on IntegriCloud