Changeset View
Standalone View
clang/docs/ReleaseNotes.rst
Show First 20 Lines • Show All 111 Lines • ▼ Show 20 Lines | |||||
- On ELF, ``-gz`` now defaults to ``-gz=zlib`` with the integrated assembler. | - On ELF, ``-gz`` now defaults to ``-gz=zlib`` with the integrated assembler. | ||||
It produces ``SHF_COMPRESSED`` style compression of debug information. GNU | It produces ``SHF_COMPRESSED`` style compression of debug information. GNU | ||||
binutils 2.26 or newer, or lld is required to link produced object files. Use | binutils 2.26 or newer, or lld is required to link produced object files. Use | ||||
``-gz=zlib-gnu`` to get the old behavior. | ``-gz=zlib-gnu`` to get the old behavior. | ||||
- Now that `this` pointers are tagged with `nonnull` and `dereferenceable(N)`, | - Now that `this` pointers are tagged with `nonnull` and `dereferenceable(N)`, | ||||
`-fno-delete-null-pointer-checks` has gained the power to remove the | `-fno-delete-null-pointer-checks` has gained the power to remove the | ||||
`nonnull` attribute on `this` for configurations that need it to be nullable. | `nonnull` attribute on `this` for configurations that need it to be nullable. | ||||
- ``-gsplit-dwarf`` no longer implies ``-g2``. | |||||
thakis: This apparently bit us (chromium) in thinlto configs. Could this here be more explicit that `… | |||||
dblaikieUnsubmitted Not Done ReplyInline ActionsArguably I think maybe it should be fixed/made to work for (thin)lto with -g2 in cflags and -gsplit-dwarf in ldflags, without the need to specify -g2 in ldflags (if that's what you're saying is currently required). Since the -gN level would hopefully at best be ignored (because the IR carries the N in -gN with it, and it'd be unfortunate it enabling split dwarf meant you had to ignore all your per-file -gN levels, or that the -gN is ignored except for allowing -gsplit-dwarf to be respected). @MaskRay ? dblaikie: Arguably I think maybe it should be fixed/made to work for (thin)lto with -g2 in cflags and… | |||||
MaskRayAuthorUnsubmitted LLD LTO does not have debug related options. ld -g is an ignored compatibility option. LLD somewhat inherited that from GNU ld. I don't think -gsplit-dwarf or -g can be separately controlled in ldflags. @thakis Can you share the crbug.com discussion thread? MaskRay: LLD LTO does not have debug related options. `ld -g` is an ignored compatibility option. LLD… | |||||
dblaikieUnsubmitted Not Done ReplyInline ActionsHmm, I guess the thing that bit Chromium would've been the need to add -g2 to cflags where previously it might've been just -gsplit-dwarf for cflags and ldflags. But it doesn't look like -g2 is needed in ldflags, only passing it to the compilation seems sufficient, then the -gsplit-dwarf passed to the link step is respected: $ clang++-tot -flto=thin test.cpp -g -c && clang++-tot -flto=thin -fuse-ld=lld -gsplit-dwarf test.o && llvm-dwarfdump-tot a.out a.out: file format elf64-x86-64 .debug_info contents: 0x00000000: Compile Unit: length = 0x0000002c, format = DWARF32, version = 0x0004, abbr_offset = 0x0000, addr_size = 0x08 (next unit at 0x00000030) 0x0000000b: DW_TAG_compile_unit DW_AT_stmt_list (0x00000000) DW_AT_comp_dir ("/usr/local/google/home/blaikie/dev/scratch") DW_AT_GNU_dwo_name ("a.out_dwo/1.dwo") DW_AT_GNU_dwo_id (0xf29563d7c812deae) DW_AT_low_pc (0x0000000000201730) DW_AT_high_pc (0x0000000000201738) DW_AT_GNU_addr_base (0x00000000) $ clang++-tot -flto=thin test.cpp -g -c && clang++-tot -flto=thin -fuse-ld=lld test.o && llvm-dwarfdump-tot a.out a.out: file format elf64-x86-64 .debug_info contents: 0x00000000: Compile Unit: length = 0x00000047, format = DWARF32, version = 0x0004, abbr_offset = 0x0000, addr_size = 0x08 (next unit at 0x0000004b) 0x0000000b: DW_TAG_compile_unit DW_AT_producer ("clang version 12.0.0 (git@github.com:llvm/llvm-project.git 0d88d7d82bc44b211a8187650a06c6cd3492186a)") DW_AT_language (DW_LANG_C_plus_plus_14) DW_AT_name ("test.cpp") DW_AT_stmt_list (0x00000000) DW_AT_comp_dir ("/usr/local/google/home/blaikie/dev/scratch") DW_AT_low_pc (0x0000000000201730) DW_AT_high_pc (0x0000000000201738) 0x0000002a: DW_TAG_subprogram DW_AT_low_pc (0x0000000000201730) DW_AT_high_pc (0x0000000000201738) DW_AT_frame_base (DW_OP_reg6 RBP) DW_AT_name ("main") DW_AT_decl_file ("/usr/local/google/home/blaikie/dev/scratch/test.cpp") DW_AT_decl_line (3) DW_AT_type (0x00000043 "int") DW_AT_external (true) 0x00000043: DW_TAG_base_type DW_AT_name ("int") DW_AT_encoding (DW_ATE_signed) DW_AT_byte_size (0x04) 0x0000004a: NULL dblaikie: Hmm, I guess the thing that bit Chromium would've been the need to add -g2 to cflags where… | |||||
New Pragmas in Clang | New Pragmas in Clang | ||||
-------------------- | -------------------- | ||||
- ... | - ... | ||||
Attribute Changes in Clang | Attribute Changes in Clang | ||||
-------------------------- | -------------------------- | ||||
▲ Show 20 Lines • Show All 202 Lines • Show Last 20 Lines |
This apparently bit us (chromium) in thinlto configs. Could this here be more explicit that -gsplit-dwarf now needs an explicit -g2 in cflags, and if using thinlto, in ldflags as well?