[all-commits] [llvm/llvm-project] fd28f7: [lld-macho] Have tests default to targeting macos ...

Jez Ng via All-commits all-commits at lists.llvm.org
Fri Apr 23 06:25:33 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fd28f71872f74cfa23f676e87e1c27c4431d6dfa
      https://github.com/llvm/llvm-project/commit/fd28f71872f74cfa23f676e87e1c27c4431d6dfa
  Author: Jez Ng <jezng at fb.com>
  Date:   2021-04-23 (Fri, 23 Apr 2021)

  Changed paths:
    M lld/test/MachO/compact-unwind-generated.test
    M lld/test/MachO/compact-unwind.s
    M lld/test/MachO/export-trie.s
    M lld/test/MachO/internalize.ll
    M lld/test/MachO/invalid/compact-unwind-bad-reloc.s
    M lld/test/MachO/invalid/compact-unwind-personalities.s
    M lld/test/MachO/invalid/invalid-relocation-length.yaml
    M lld/test/MachO/invalid/invalid-relocation-pcrel.yaml
    M lld/test/MachO/lc-linker-option.ll
    M lld/test/MachO/linkonce.ll
    M lld/test/MachO/lit.local.cfg
    M lld/test/MachO/load-command-sequence.s
    M lld/test/MachO/local-got.s
    M lld/test/MachO/lto-archive.ll
    M lld/test/MachO/lto-object-path.ll
    M lld/test/MachO/lto-save-temps.ll
    M lld/test/MachO/map-file.s
    M lld/test/MachO/mh-header-link.s
    M lld/test/MachO/module-asm.ll
    M lld/test/MachO/objc.s
    M lld/test/MachO/symtab.s
    M lld/test/MachO/t.s
    M lld/test/MachO/x86-64-reloc-unsigned.s
    M lld/test/MachO/x86-64-relocs.s
    M lld/test/MachO/x86-64-stubs.s

  Log Message:
  -----------
  [lld-macho] Have tests default to targeting macos 10.15

D101114 enforced proper version checks, which exposed a variety of version
mismatch issues in our tests. We previously changed the test inputs to
target 10.0, which was the simpler thing to do, but we should really
just have our lit.local.cfg default to targeting 10.15, which is what is done
here. We're not likely to ever have proper support for the older versions
anyway, as that would require more work for unclear benefit; for instance,
llvm-mc seems to generate a different compact unwind format for older macOS
versions, which would cause our compact-unwind.s test to fail.

Targeting 10.15 by default causes the following behavioral changes:
* `__mh_execute_header` is now a section symbol instead of an absolute symbol
* LC_BUILD_VERSION gets emitted instead of LC_VERSION_MIN_MACOSX. The former is
  32 bytes in size whereas the latter is 16 bytes, so a bunch of hardcoded
  address offsets in our tests had to be updated.
* >= 10.6 executables are PIE by default

Note that this diff was stacked atop of a local revert of most of the test
changes in rG8c17a875150f8e736e8f9061ddf084397f45f4c5, to make review easier.

Reviewed By: #lld-macho, oontvoo

Differential Revision: https://reviews.llvm.org/D101119




More information about the All-commits mailing list