This is an archive of the discontinued LLVM Phabricator instance.

[lld-macho] No need to explicitly specify -arch in tests
ClosedPublic

Authored by int3 on Jun 13 2020, 10:00 PM.

Details

Reviewers
MaskRay
Group Reviewers
Restricted Project
Commits
rG51c5baacf36f: [lld-macho] No need to explicitly specify -arch in tests
Summary

After D81326: lld: improve the `-arch` handling for MachO landed, some tests started failing if they did not have -arch specified. I think one of the reasons happened was due to the fact that we were taking a reference to a temporary value that was freed too early. Fixing that got the error to go away on my local Linux machine. I'm actually wondering if it's still possible for our tests to fail if they run on 32-bit x86 machines -- we specify REQUIRES: x86, but REQUIRES: x86_64 doesn't seem to be a valid setting -- but in practice the tests seem to pass on Harbormaster, so I guess it's fine...?

Diff Detail

Event Timeline

int3 created this revision.Jun 13 2020, 10:00 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 13 2020, 10:00 PM
Harbormaster completed remote builds in B60225: Diff 270601.
int3 edited the summary of this revision. (Show Details)Jun 13 2020, 11:48 PM
int3 added a reviewer: Restricted Project.
MaskRay accepted this revision as: MaskRay.Jun 14 2020, 3:27 PM
MaskRay added a subscriber: MaskRay.

we specify REQUIRES: x86, but REQUIRES: x86_64 doesn't seem to be a valid setting -- but in practice the tests seem to pass on Harbormaster, so I guess it's fine...?

lld/test/lit.cfg.py defines:

llvm_config.feature_config(
    [('--build-mode', {'DEBUG': 'debug'}),
     ('--assertion-mode', {'ON': 'asserts'}),
     ('--targets-built', {'AArch64': 'aarch64',
                          'AMDGPU': 'amdgpu',
                          'ARM': 'arm',
                          'AVR': 'avr',
                          'Hexagon': 'hexagon',
                          'Mips': 'mips',
                          'MSP430': 'msp430',
                          'PowerPC': 'ppc',
                          'RISCV': 'riscv',
                          'Sparc': 'sparc',
                          'WebAssembly': 'wasm',
                          'X86': 'x86'})
     ])

x86_64 is not a lit feature.

This revision is now accepted and ready to land.Jun 14 2020, 3:27 PM
This revision was automatically updated to reflect the committed changes.