intel / yarpgen

Yet Another Random Program Generator
Other
484 stars 53 forks source link

Can `yarpgen` run on MSVC? #193

Closed OfekShilon closed 11 months ago

OfekShilon commented 11 months ago

Unlike clang/gcc, MS's cl.exe is not a driver that can invoke the linker. Is there some test_sets.txt setting that can get generated programs to build?

LowLevelMahn commented 11 months ago

MS's cl.exe is not a driver that can invoke the linker.

that not true

https://learn.microsoft.com/en-us/cpp/build/reference/cl-invokes-the-linker?view=msvc-170

CL automatically invokes the linker after compiling unless the /c option is used.

OfekShilon commented 11 months ago

@LowLevelMahn thanks, didn't know this. Will close the issue.

LowLevelMahn commented 11 months ago

and "yes" please, integrate MSVC into your testing - you will find many ICEs :)

regehr commented 11 months ago

this would definitely be interesting but I'm not sure any of us has the time to test this compiler right now (I don't even know if any of us has a Windows machine at all).

but I agree that we want yarpgen to work, for some reasonable value of work, on windows.

OfekShilon commented 10 months ago

@regehr I made some changes on my fork towards the end of being able to run on windows - but the main obstacle is the use of multiprocessing. On linux a new process is forked, on windows it is spawned - and many globals that are initialized only in main do not survive the spawn. As far as I can see solving this would require some re-design.

You can imitate the problem on linux by calling multiprocessing.set_start_method("spawn") from main on linux too. Perhaps you have any idea how to support spawning? Perhaps yarpgen can be made to use threading instead of multiprocessing?

I think MSVC has a lot to gain from this tool, really hope this can be made possible.