Commit Graph

16 Commits

Author SHA1 Message Date
Jez Ng 3d5e5066f1 [lld-macho][nfc] Clean up tests
* Remove unnecessary `rm -rf %t`s
* Have lc-linker-option.ll use the right comment marker
2021-05-10 15:45:54 -04:00
Greg McGary 4b89629403 [lld-macho][NFC] Purge stale test-output trees prior to split-file
Enforce standard practice

Differential Revision: https://reviews.llvm.org/D102112
2021-05-08 17:36:30 -07:00
Jez Ng db7a413e51 [lld-macho] Re-root absolute input file paths if -syslibroot is specified
Reviewed By: #lld-macho, gkm

Differential Revision: https://reviews.llvm.org/D100147
2021-04-15 21:16:33 -04:00
Vy Nguyen dee5787d3e Reland [lld-macho][nfc] minor clean up, follow up to D98559
This reverts commit 77b4230ed9.

New change: Fixed tests on windows

     Differential Revision: https://reviews.llvm.org/D99210
2021-03-25 16:46:37 -04:00
Vy Nguyen d988ffc34f [lld-macho][nfc] Fixed test so it output to %t/ rather than current directory.
The a.out broke our build.

Differential Revision: https://reviews.llvm.org/D99271
2021-03-24 16:55:37 -04:00
Shoaib Meenai 48d9b2fd8e [lld] Fix test to work with and without a vendor string 2021-03-23 16:16:25 -07:00
Vy Nguyen aa6e4cdd73 [lld-macho] Fixed lld-version expectation in test so it works on Fuchsia.
On Fuchsia, it's called Fuchsia LLD

Differential Revision: https://reviews.llvm.org/D99217
2021-03-23 17:56:23 -04:00
Vy Nguyen 77b4230ed9 Revert "[lld-macho][nfc] minor clean up, follow up to D98559"
This reverts commit 1bc33eb6a3.
tests failed on windows
2021-03-23 17:15:36 -04:00
Vy Nguyen 1bc33eb6a3 [lld-macho][nfc] minor clean up, follow up to D98559
Differential Revision: https://reviews.llvm.org/D99210
2021-03-23 16:13:09 -04:00
Vy Nguyen f499b932bf Revert "Revert "Revert "Revert "Revert "Revert "[lld-macho] Implement -dependency_info (partially - more opcodes needed)""""""
This reverts commit 4876ba5b2d.

Third-attemp relanding D98559, new change:
  - explicitly cast enum to underlying type to avoid ambiguity (workaround to clang's bug).
2021-03-23 14:51:05 -04:00
Mehdi Amini 4876ba5b2d Revert "Revert "Revert "Revert "Revert "[lld-macho] Implement -dependency_info (partially - more opcodes needed)"""""
This reverts commit 3c21166a94.
The build is broken (clang-8 host compiler):

lld/MachO/DriverUtils.cpp:271:8: error: use of overloaded operator '<<' is ambiguous (with operand types 'llvm::raw_fd_ostream' and 'lld::macho::DependencyTracker::DepOpCode')
    os << opcode;
    ~~ ^  ~~~~~~
2021-03-23 00:19:12 +00:00
Vy Nguyen 3c21166a94 Revert "Revert "Revert "Revert "[lld-macho] Implement -dependency_info (partially - more opcodes needed)""""
This reverts commit 9670d2e4af.

Second attemp to reland D98559. New changes:
 - inline functions removed from cpp file.
 - updated tests to use CHECK-DAG instead of CHECK-NEXT
 - fixed ambiguous "<<" operator by switching `char` to uint8_t
2021-03-22 19:34:51 -04:00
Vy Nguyen 9670d2e4af Revert "Revert "Revert "[lld-macho] Implement -dependency_info (partially - more opcodes needed)"""
This reverts commit 5ad2c225f3.

bots still  unhappy - revertting again
2021-03-22 14:54:01 -04:00
Vy Nguyen 5ad2c225f3 Revert "Revert "[lld-macho] Implement -dependency_info (partially - more opcodes needed)""
This reverts commit 2554b95db5.

Relanding [lld-macho] Implement -dependency_info (D98559) with changes:
 - inline functions removed from cpp file.
 - updated tests to not check libSystem.tbd with other input files (because of possible indeterministic ordering)
2021-03-22 14:41:57 -04:00
Nico Weber 2554b95db5 Revert "[lld-macho] Implement -dependency_info (partially - more opcodes needed)"
This reverts commit c53a1322f3.
Test only passes depending on build dir having a lexicographically later name
than the source dir, and doesn't link on mac/win. See
https://reviews.llvm.org/D98559#2640265 onward.
2021-03-21 16:35:38 -04:00
Vy Nguyen c53a1322f3 [lld-macho] Implement -dependency_info (partially - more opcodes needed)
Bug: https://bugs.llvm.org/show_bug.cgi?id=49278
The flag is not well documented, so this implementation is based on observed behaviour.

When specified, `-dependency_info <path>` produced a text file containing information pertaining to the current linkage, such as input files, output file, linker version, etc.

This file's layout is also not documented, but it seems to be a series of null ('\0') terminated strings in the form `<op code><path>`

`<op code>` could be:
   `0x00` : linker version
   `0x10` : input
   `0x11` : files not found(??)
   `0x40` : output

`<path>` : is the file path, except for the linker-version case.

(??) This part is a bit unclear. I think it means all the files the linker attempted to look at, but could not find.

Differential Revision: https://reviews.llvm.org/D98559
2021-03-21 14:35:46 -04:00