toolchain icon indicating copy to clipboard operation
toolchain copied to clipboard

Add user guide

Open matteodelabre opened this issue 3 years ago • 2 comments

matteodelabre avatar Apr 09 '21 10:04 matteodelabre

https://old.reddit.com/r/RemarkableTablet/comments/r9io3l/1liner_to_build_an_app_gui_included/

matteodelabre avatar Dec 05 '21 17:12 matteodelabre

From #13:

Regarding setting a default value in the environment for CMAKE_TOOLCHAIN_FILE, I’m actually not convinced it’s the best solution. Consider projects that need to build some executables with the “normal” gcc compiler, and then use the resulting executables in the cross build [1]. Setting a default for CMAKE_TOOLCHAIN_FILE in this case will break the part that needs the normal gcc. We would need to unset the env var before running cmake to build the first part, and then setting the env var back before building the second part. This is also the reason why I haven’t overridden the CC and CXX env vars in the image: some parts of the build may want the normal gcc, and some other parts the cross gcc. I think it’s best that each part explicitly declares which compiler it wants, for example by passing the CMAKE_TOOLCHAIN_FILE argument for CMake projects, or setting the CXX variable, etc.

As you’ve mentioned, having such a behavior differ from the oecore toolchain means both toolchains need to be handled differently. This may not be desirable. But the oecore behavior is really not ideal for projects having a dual-compiler layout.

[1] I have encountered such cases before. This can be used for example to generate some code that is used for the second half of the build.

Originally posted by @matteodelabre in https://github.com/toltec-dev/toolchain/issues/13#issuecomment-1008074952

matteodelabre avatar Feb 27 '22 19:02 matteodelabre