This is an archive of the discontinued LLVM Phabricator instance.

[cmake] Generate symbol exports files in config subdir
AcceptedPublic

Authored by Ilod on Feb 1 2017, 12:45 AM.

Details

Summary

When generating native symbols export files, these files are generated in CMAKE_CURRENT_BINARY_DIR. However, on multi-configuration build-systems, such as Xcode and MSVC, this folder is shared between all configurations.
On this case, switching configuration may make the build system think the file is up-to-date, and use the file from the other configuration (resulting in link error if referencing symbol no longer existing because of inlining, or in non-exported symbols in the reverse case).

This patch generate the files in the CMAKE_CFG_INTDIR subfolder, to have a different file for each configuration.

Diff Detail

Event Timeline

Ilod created this revision.Feb 1 2017, 12:45 AM
This revision is now accepted and ready to land.Feb 3 2017, 10:28 AM
Ilod added a comment.Feb 8 2017, 6:31 AM

I don't have commit rights, so I'll be dependent of someone commiting it for me.