When building Kaleidoscope, the compiled object files are linked together into a
static archive. This static archive has a very simple structure, and only stores
filenames, not paths, not even relative ones. As such, we can't have files with
the same name, because they will conflict, and one will override the other.
To avoid this situation, this script will find all cpp source files (we don't
need to care about header-only things, those do not result in an object file),
and will comb through them to find conflicting filenames.
If a conflict is found, it will print all files that share the name, and will
exit with an error at the end. It does not exit at the first duplicate, but will
find and print all of them.
If no conflict is found, the script just prints its status message and exits
with zero.
This addresses the bulk of #850.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
for some reason, this line shows up on stderr anytime I (or the
find-device-port script) run `system_profiler SPUSBDataType`
2020-02-24 23:19:14.656 system_profiler[23932:4118769] SPUSBDevice:
IOCreatePlugInInterfaceForService failed 0xe00002be
I got annoyed enough to suppress it, so I could see the other output
that I actually care about.
This adds some quotes to various paths used in Kaleidoscope's build system.
This fixes builds on msys2 that failed due to whitespaces in system paths.
Signed-off-by: Florian Fleissner <florian.fleissner@inpartik.de>
Many build systems allow C and C++ compilers to be specified
via environment variables C and CXX.
This commit enables this for kaleidoscope-builder.
Furtheron, on unixoid systems virtual builds are possible through a
command line similar to
CXX=<path to C++ compiler> C=<path to C compiler> ARCH=virtual make
Signed-off-by: Florian Fleissner <florian.fleissner@inpartik.de>
This commit induces the following changes:
bin/kaleidoscope-builder
* ccache dummy compiler and executables are now generated in a way
that allows using the same CCACHE_WRAPPER_PATH for virtual and
non-virtual builds
* virtual builds are now triggered by either specifying the full FQBN with x86
as architecture or by defining ARCH=x86
etc/kaleidoscope-builder.conf
* COMPILER_PREFIX and COMPILER_PATH are now determined (if not predefined)
based on ARCH or FQBN
Signed-off-by: Florian Fleissner <florian.fleissner@inpartik.de>
1. Better matches other _PATH env variables
2. Since it's something that might reasonably get set in the
environment, prefix it with KALEIDOSCOPE
Signed-off-by: Jesse Vincent <jesse@keyboard.io>
This is particularly important for in-kaleidoscope-tree artifacts like
the examples.
If we build the examples and move the compiled artifacts into the
Kaleidoscope tree, even under examples, it busts arduino's core
compilation cache, adding an extra 10s to the next compilation.
Signed-off-by: Jesse Vincent <jesse@keyboard.io>