Repository navigation
[core] circumvent call to rmkdepend - #23492
ferdymercury wants to merge 23 commits into
Conversation
AI-assisted
Test Results 23 files 23 suites 3d 12h 32m 29s ⏱️ For more details on these failures, see this check. Results for commit e3e4e3d. ♻️ This comment has been updated with latest results. |
warning: treating 'c-header' input as 'c++-header' when in C++ mode, this behavior is deprecated [-Wdeprecated]
otherwise one needs to fall back to rmkdepend for WIN32
as suggested by pcanal
|
@bellenot could you check on Windows why this error is printed in the CI?
|
|
unix failures are unrelated. win32 failure are related, but only 6 tests failing, so not too bad. |
|
@ferdymercury do you need help to push this through, e.g. by @bellenot ? |
|
I'll take a look |
| // Generate the dependency via standard output, not searching the | ||
| // standard include directories, | ||
| #ifdef WIN32 | ||
| TString compiler = "\"" COMPILER "\""; // 'Program Files' contains spaces on Windows |
There was a problem hiding this comment.
Usually we use the CXX (actually indirectly) from compiledata.h and this does not usually contain spaces (it is the basename of the compiler).
There was a problem hiding this comment.
I think this is slightly safer in case it changes later on?
There was a problem hiding this comment.
It is a two edges sword. We had to go with the basename because the same version of the compiler is not always installed in the same location on all system (but is almost always in the path). When we used the full path name we failed unless the binary was installed in the exact same configuration/distribution. This is critical for the experiment software. Even for Windows this is needed since the user can elect to install the compiler in a different place (for example on a different disk for space reason).
| cmd += " -MF \"" + depfilename + "\""; | ||
| cmd += " -MT \""; | ||
| R__AddPath(cmd, targetname); | ||
| cmd += "\" "; |
There was a problem hiding this comment.
The design of ACLiC here was to delegate this whole command line build (for the most part) to the build system and insert it in compiledata.h
For example we have:
#define MAKESHAREDLIB "cd $BuildDir ; c++ -fPIC -c $Opt -Wc++11-narrowing -Wsign-compare -Wsometimes-uninitialized -Wconditional-uninitialized -Wheader-guard -Warray-bounds -Wcomment -Wtautological-compare -Wstrncat-size -Wloop-analysis -Wbool-conversion -m64 -pipe -W -Woverloaded-virtual -fsigned-char -fsized-deallocation -fno-common -Qunused-arguments -pthread -stdlib=libc++ -std=c++17 $IncludePath $SourceFiles ; c++ $Opt $ObjectFiles -dynamiclib -Wl,-headerpad_max_install_names -m64 -Wl,-dead_strip_dylibs -Wl,-install_name,@rpath/$LibName.so $RPath $LinkedLibs -o $SharedLib "
So I would imagine we would add a new line in compiledata.h with all the compiler/OS specific part filed in and the run-time part easily inserted via some $variables
There was a problem hiding this comment.
Since this PR is a bit complicated, now that the CI is green, I'd prefer doing this optimization in a subsequent one. On the other hand, only TSystem would be using this, so I do not see that it simplifies things. The ifdefs in the Cxx would be just moved to the CMake code, so similar if not larger number of lines and more abstraction. If there would be more places being used, then I would see that more clearly.
There was a problem hiding this comment.
Yes, it sortof can wait for a further PR. Yes, the complexity is essentially the same.
There is 2 major distinctions
One is to have the same pattern for all the cases rather than 2 different ways.
Additionally, going through the indirection of having one command line pattern allows the user to manipulate and customizing as they need.
|
@ferdymercury With my suggestions: |
by bellenot and pcanal Co-authored-by: Bertrand Bellenot <bellenot@users.noreply.github.com>
|
CI failure seems unrelated. I don't know if someone wants to run some speed test benchmark of compiling some long script with AcLiC? Maybe @LukasBreitwieser ? |
to allow relocation as suggested by pcanal also basename does not contain spaces in general, so no need for escaping
maybe it improves performance a bit
and one could get rid of rmkdepend dependency / hard-coded builtin
AI-assisted
not yet fully working