-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Windows bulding: Make dependency generation not quite as talkative #15006
Conversation
The modified way to generate .d files had an unfortunate side effect, that it outputs the whole preprocessed file and not just the dependency lines, at least with MSVC's cl. That gave util/add-depends.pl a whole lot more to read through, which impacts greatly on the performance of dependency treatment. We modify the process by adding a config target attribute 'make_depend', which can be any suitable command for generating such lines. All it needs is to also accept C flags and macro definitions. Fixes openssl#14994
This is an alternative to #15001 |
@tanzislam, it would be great if you would test this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good. The "master"-branch is apparently broken somehow with C++Builder (guessing due to 6b29784):
> perl Configure BC-32 --prefix=%CD% no-asm
...
> make -N
...
cmd /C ""ilink32" -x -Gn -q -w-dup -j"C:\Program Files (x86)\Embarcadero\Studio\20.0\lib\win32c\release" -L"C:\Program Files (x86)\Embarcadero\Studio\20.0\lib\win32c\release" -aa -Tpd c0d32.obj -x -Gn -q -w-dup -j"C:\Program Files (x86)\Embarcadero\Studio\20.0\lib\win32c\release" -L"C:\Program Files (x86)\Embarcadero\Studio\20.0\lib\win32c\release" @MAKE0001.@@@ || (DEL /Q libcrypto-3.* libcrypto.lib & EXIT 1)"
Error: Unresolved external 'WspiapiLoad' referenced from C:\USERS\T_17_\SOURCE\REPOS\CRYPTOPALS\OPENSSL_ANOTHER\CRYPTO\BIO\LIBCRYPTO-SHLIB-B_ADDR.OBJ
Error: Unable to perform link
I'll investigate and fix that separately. Don't want to delay fixing the MSVC-build.
UPDATE: Raised https://quality.embarcadero.com/browse/RSP-33806. Can't think of a workaround, so raised #15025 to undo that commit for C++Builder.
@tanzislam is there a guest login for this link? |
Previously, we had dependency making pretty much hard coded in the build file templates, with a bit of an exception for Unix family platforms, where we had different cases depending on what dependency making program was found. With the Embarcadero C++ builder, a separate scheme appeared, with a different logic. This change merges the two, and introduces two config target attributes: makedepcmd The program to use, where this is relevant. This replaces the earlier configuration attribute 'makedepprog'. makedep_scheme This is a keyword that can be used by build files templates to produce different sorts of commands, but most importantly, to pass as argument to util/add-depend.pl, which uses this keyword as a "producer" for the dependency lines. If the config target doesn't define the 'makedep_scheme' attribute, Configure tries to figure it out by looking for GCC compatible compilers or for the 'makedepend' command.
Unfortunately not. It's free to create an Embarcadero account at https://www.embarcadero.com/products/cbuilder/starter/free-download I gave them a minimal example that does not link when compiled as C, but does so as C++: __inline void func(void) { return; }
int main(void)
{
func();
return 0;
} |
It was discovered that MSVC has localized /showIncludes output. Fortunately, it still seems to follow the same generic format, so we can adapt the regular expression to make it language agnostic. Fixes openssl#14994
I did a bit or rework to make the whole dependency making stuff less of a hack. |
Restating my question #14994 (comment) here, where it seems more fitting:
|
@mspncp, I would rather have the question of makedepend being enable or disabled by default to be a separate issue. Please don't pile more stuff into one issue. |
Ok, no problem. |
@openssl, a review, please? |
24 hours has passed since 'approval: done' was set, but this PR has failing CI tests. Once the tests pass it will get moved to 'approval: ready to merge' automatically, alternatively please review and set the label manually. |
The only failure was that the AppVeyor build was cancelled. |
The modified way to generate .d files had an unfortunate side effect, that it outputs the whole preprocessed file and not just the dependency lines, at least with MSVC's cl. That gave util/add-depends.pl a whole lot more to read through, which impacts greatly on the performance of dependency treatment. We modify the process by adding a config target attribute 'make_depend', which can be any suitable command for generating such lines. All it needs is to also accept C flags and macro definitions. Fixes #14994 Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Matthias St. Pierre <[email protected]> (Merged from #15006)
Previously, we had dependency making pretty much hard coded in the build file templates, with a bit of an exception for Unix family platforms, where we had different cases depending on what dependency making program was found. With the Embarcadero C++ builder, a separate scheme appeared, with a different logic. This change merges the two, and introduces two config target attributes: makedepcmd The program to use, where this is relevant. This replaces the earlier configuration attribute 'makedepprog'. makedep_scheme This is a keyword that can be used by build files templates to produce different sorts of commands, but most importantly, to pass as argument to util/add-depend.pl, which uses this keyword as a "producer" for the dependency lines. If the config target doesn't define the 'makedep_scheme' attribute, Configure tries to figure it out by looking for GCC compatible compilers or for the 'makedepend' command. Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Matthias St. Pierre <[email protected]> (Merged from #15006)
It was discovered that MSVC has localized /showIncludes output. Fortunately, it still seems to follow the same generic format, so we can adapt the regular expression to make it language agnostic. Fixes #14994 Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Matthias St. Pierre <[email protected]> (Merged from #15006)
The modified way to generate .d files had an unfortunate side effect,
that it outputs the whole preprocessed file and not just the dependency
lines, at least with MSVC's cl. That gave util/add-depends.pl a whole
lot more to read through, which impacts greatly on the performance of
dependency treatment.
We modify the process by adding a config target attribute 'make_depend',
which can be any suitable command for generating such lines. All it
needs is to also accept C flags and macro definitions.
Fixes #14994