This is an archive of the discontinued LLVM Phabricator instance.

[asan] Specialize the initialization-bug.cc testcase for Darwin (it needs a deployment target of 10.11+)
ClosedPublic

Authored by kubamracek on Nov 21 2016, 12:54 PM.

Details

Summary

The ODR detection in initialization-bug.cc now works on Darwin (due to the recently enabled "live globals" on-by-default), but only if the deployment target is 10.11 or higher. Let's adjust the testcases.

Diff Detail

Repository
rL LLVM

Event Timeline

kubamracek retitled this revision from to [asan] Specialize the initialization-bug.cc testcase for Darwin (it needs a deployment target of 10.11+).
kubamracek updated this object.
kubamracek added reviewers: kcc, zaks.anna, rnk, eugenis.
kubamracek set the repository for this revision to rL LLVM.
kubamracek added a project: Restricted Project.
kubamracek added a subscriber: llvm-commits.
rnk edited edge metadata.Nov 21 2016, 1:05 PM

Rather than duplicating the test, maybe we should add a lit substitution that expands to 10.11 deployment target?

In D26927#601704, @rnk wrote:

Rather than duplicating the test, maybe we should add a lit substitution that expands to 10.11 deployment target?

If I add "REQUIRES: osx10.11" the test won't be run on non-OSX platforms. Are you suggesting something else?

rnk added a comment.Nov 21 2016, 1:11 PM

I'm suggesting this kind of thing:

// RUN: %clangxx_asan %mac_min_target_10.11 -O0 %s %p/../Helpers/initialization-bug-extra2.cc -o %t-INIT-ORDER-EXE
...
// UNSUPPORTED: osx-no-ld64-live_support

lit.common.cfg:

...
config.available_features.add('osx-ld64-live_support')
config.substitutions.append( ("%mac_min_target_10.11", "-mmacosx-version-min=10.11") )
kubamracek updated this revision to Diff 78769.Nov 21 2016, 1:26 PM
kubamracek edited edge metadata.
kubamracek removed rL LLVM as the repository for this revision.

Okay, sounds good. Updating the patch.

rnk accepted this revision.Nov 21 2016, 1:33 PM
rnk edited edge metadata.

lgtm

This revision is now accepted and ready to land.Nov 21 2016, 1:33 PM
This revision was automatically updated to reflect the committed changes.