[LLVMdev] Fix for non-standard variable length array + Visual C X86 specific code

Morten Ofstad morten at hue.no
Tue Oct 19 00:49:56 PDT 2004


>> Alternatively, compiling the X86
>> support as a dll would also work, have you tried that?
> 
> Why is it supposed to work? Linking with an import library will add all 
> its symbols? I was not expecting a different behavior between linking 
> against a static and a dynamic library...

It would work because the dll would call the static initializers -- 
within the dll there are references between the objects, and calling the 
DllMain will require the static initializers to be called.

However there are huge problems with creating a dll, since every symbol 
used in the dll which comes from the outside have to be imported from 
other dlls so everything would have to be converted to dlls and having 
proper __declspec(dllexport) / __declspec(dllimport) everywhere. I think 
it's just not feasible.

My only remaining idea is to create a file which #includes all the .cpp 
files for the x86 target to create a single object...

m.





More information about the llvm-dev mailing list