You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Imagine a simple C++ project with main.c++ and helper.c++. One possible execution for Ekam is:
Compile main.c++ -> main.o
Attempt to link main.o -> main (since it has a main symbol). Fail, since helper.o isn't yet compiled.
Compile helper.c++ -> helper.o. Notice that the new object file has symbols that were missing in step 2.
Link main.o + helper.o -> main
Step 2 is unnecessary and slows down the build. This problem becomes worse as more steps are added (e.g. if some .c++ or .h files are generated by capnp or another tool).
One possible way to fix this is to allow .ekam-rule files to specify a priority, so that .capnp files are built before .c files, and .c before .o.
The text was updated successfully, but these errors were encountered:
A simple priority doesn't work since to build a .capnp file you first need to build the capnp compiler tool which is itself compiled and linked from C++ source code. But with knowledge of the dependency tree from a previous run, we could be smarter about running things in the expected dependency order.
I'm not entirely convinced that Ekam actually wastes a whole lot of time on premature linking, though. The linker fails pretty quickly if symbols are missing. It would be nice to quantify this problem before spending time on it.
Imagine a simple C++ project with
main.c++
andhelper.c++
. One possible execution for Ekam is:main
(since it has amain
symbol). Fail, sincehelper.o
isn't yet compiled.main
Step 2 is unnecessary and slows down the build. This problem becomes worse as more steps are added (e.g. if some .c++ or .h files are generated by capnp or another tool).
One possible way to fix this is to allow .ekam-rule files to specify a priority, so that .capnp files are built before .c files, and .c before .o.
The text was updated successfully, but these errors were encountered: