-
Notifications
You must be signed in to change notification settings - Fork 31
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
"flexlink -install" to compile its own runtime objects #46
base: master
Are you sure you want to change the base?
Conversation
…<dir>) (Also uses the prefixed gcc for cygwin/cygwin64.)
…e in the build system.
The principle behind this looks fine, though it would at present break bootstrapping flexdll in OCaml. It's only a small piece of duplication, but it would be better for the Makefile still to build the C objects "by hand" (since this is what the OCaml flexdll target does and is also what the opam flexdll package will do). That would leave Would you be happy to defer this until after 4.06.0 (so release 0.37 now)? The other thoughts I have:
|
All good points, thanks! Delaying to after 0.37. |
I still suggest to install sources of support files in the binary distrib (dfd6212). Do you agree? |
I hadn't properly registered that, sorry - actually, with this flag, I'm kind of wondering if there needs to be object files in the binary distribution at all? FlexDLL obviously makes no sense as a package without a compiler, so why not just package up flexlink.exe and always require That's related to my suggestion of shifting towards always installing the objects with the application (i.e. OCaml - or in an arch-specific folder for the Cygwin/MSYS packages). Not keeping them with flexlink.exe also neatly solves the problem of wanting to have msvc objects compiled for pre- and post-VS2015. |
Of course we could drop them altogether, but keeping them allows for a smoother transition. One can tell people to upgrade to, say, flexdll 0.38, and it will work even if they have e.g. older versions of OCaml still around. The official instructions will likely be to use |
As discussed with @dra27, the idea is to let flexlink creates its own object files (flexdll_{initer_,}CHAIN.{obj,o}`). The following options are added to flexink:
-install
: ask flexlink to compile the two objects files for the selected-chain
and put them in the directory specified by-o
.-cc-prefix <PREFIX>
: a string to be prepended to all tools of the selected toolchain; this can be used for gcc (mingw/cygwin) to specify an actual prefix such asi686-w64-mingw32-
(defaults are used for those toolchains) and for cl (msvc) to specify an explicit directory (typically to select the 64-bit cl.exe even though it is not currently in the path). This option is used in the build system itself, but it should not be required by external users; they are likely to set up the path to find the correct cl.exe.-runtime-objects <DIR>
: specify the directory where runtime objects should be looked up.@dra27 : please comment!