-
Notifications
You must be signed in to change notification settings - Fork 397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building HelloWorld pass on windows under visual studio 2019 #54
Comments
Hi @Culpr0 , thanks for visiting 👋🏻 . Unfortunately, I don't have a Windows machine that I could test this on. Also, plugins are not supported on Windows and hence llvm-tutor has no Windows support. I know that this could still work, but I'd need a volunteer to help me with this. Hopefully somebody else will notice this I will be able to help. -Andrzej |
If you're fine with moving to Visual Studio 2022, I can handle this. |
+1 |
I think all you need to add would be either use a .def file with a export or do |
` $ opt -load-pass-plugin=HelloWorld.dll |
Hello, i build LLVM on windows under Visual Studio 2019 with the config like this:
cmake -S llvm\llvm -B build -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang;lld" -DLLVM_EXPORT_SYMBOLS_FOR_PLUGINS=On -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_TARGETS_TO_BUILD=X86 -Thost=x64
now i download this tutor and want to compile it, i do:
As you can see it produces weird result, i looked solution in this repository and found one suggestion to change
CMakeLists.txt
:Changed
MODULE
toSHARED
works it produced build filesthis produced
HelloWorld.dll
.Now i want to use this and do:
opt -load-pass-plugin="C:\passes\december\HelloWorld\build\Release\HelloWorld.dll" -passes="hello-world" -disable-output Source.bc
And get output
I checked HelloWord.dll and main entry point is
DllEntryPoint
i assume i needllvmGetPassPluginInfo
as exported function?? How do you get this to workThe text was updated successfully, but these errors were encountered: