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
How to obtain filename of currently building library or executable #5976
Comments
The other, really simple option is to use the /Z7 switch instead of /Zi which will embed the debug info in the library/exe itself, but using a separate pdb is better. |
If in the build configuration file, you can refer to MRuby::Build.new do |conf|
...
bindir = File.join(conf.build_dir, "bin")
libdir = File.join(conf.build_dir, "lib")
...
end |
Thanks. That gets me part of the way there. Now I need the name of the current library or executable being built. I'm happy to delve into the build system to do this (and submit a PR) but I've not been able to find a method to return me this information anywhere. |
Currently, there is no mechanism to obtain the final library and executable names from within the build configuration file.
One thing to note is that when executing the linker, it is not possible to specify a different debug file name for each individual executable name (Build system needs to be extended). |
I'm trying to make a change to the build system so that the name of the program database is specified. This is necessary for debugging under visual studio and will also prevent a stray vc143.pdb file from being generated directly in the mruby root.
In order to do this, for each src file that is being compiled I need to know the filename of the library or executable that it will end up in so I can base the pdb name on that, eg libmruby.lib -> libmruby.pdb, mrbc.exe -> mrbc.pdb etc. I thought that something like Build.current might lead me there but I've been unable to find a way to do it. The build system is rather complex...
Anyone help me out?
The text was updated successfully, but these errors were encountered: