This is an archive of the discontinued LLVM Phabricator instance.

[CMake] Add partial support for MSVC in compiler-rt builtins
ClosedPublic

Authored by roman.shirokiy on Feb 19 2016, 8:56 AM.

Details

Summary

This enables MSVC build of complex number arithmetic compiler-rt builtins.

Related driver patch:
http://reviews.llvm.org/D17453

Consider Clang which is built under native Windows environment. Compiling the following code will result in "unresolved external symbol __divsc3 referenced in function main"

int main(){

float _Complex a, b, c;
c = a / b;
return 0;

}

Clang front-end generates calls to complex number arithmetic functions, which are nowhere to be found in Microsoft runtime libs. The idea of this patch is to enable MSVC build of compiler-rt builtins library with certain subset of ported-to-CL sources and link this lib in case if user has explicitly demanded so through "--rtlib" option. This will allow to compile code with usage of complex number arithmetic in general and spec2006/462.libquantum in particular.

Diff Detail

Repository
rL LLVM

Event Timeline

roman.shirokiy retitled this revision from to [CMake] Add partial support for MSVC in compiler-rt builtins.
roman.shirokiy updated this object.
roman.shirokiy added reviewers: rnk, majnemer, beanz, pcc.
roman.shirokiy updated this object.
roman.shirokiy added a subscriber: cfe-commits.
beanz accepted this revision.Feb 19 2016, 9:00 AM
beanz edited edge metadata.

Looks good to me.

This revision is now accepted and ready to land.Feb 19 2016, 9:00 AM
This revision was automatically updated to reflect the committed changes.