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
* Fix mixed code precompiled libraries
This patch restores some functionalities broken by #512 .
It introduces a BREAKING CHANGE to "precompiled" field
If merged, "precompiled" means that the library ONLY contains a precompiled library and its headers.
No file containing implementation will be compiled if the library is specified as such.
Fixesarduino/arduino-builder#353
Tested with
* #512 (comment) (Nano33BLE and generic MKR board)
* https://github.com/BoschSensortec/BSEC-Arduino-library (works after removing precompiled=true directive in library.properties)
* https://github.com/vidor-libraries/USBBlaster (MKRVidor, fully precompiled)
* Added test-build for Arduino_TensorFlowLite
* Added another test for Bosch Sensor lib
* Fallback search for precompiled libraries in non-fpu specific directories
* variable renamed
* Moved fixLDFLAG inside compileLibraries
* Inlined FixLDflags
* Using more paths helpers to simplify code
* Added support for "precompiled=full" in library.properties
This flag allow the deployment of a pure precompiled library that ships
also the source code of the precompiled part.
This allows to possibly compile-from-source as a fallback if the library
does not provide a precompiled build for the current architecture.
The "precompiled=true" instead has been ported back to the old behaviour
(for libraries that ships a precompiled binary and support source code
that wraps/uses the precompiled part).
* Updated tests
* Fixed test compile-build on very long paths on Windows
* Removed constants.BUILD_PROPERTIES_COMPILER_LIBRARIES_LDFLAGS
* Add space before "-L" gcc flag to allow multiple precompiled libs to be included
Co-authored-by: Cristian Maglie <[email protected]>
Copy file name to clipboardExpand all lines: test/conftest.py
+23-1
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,7 @@
20
20
importsimplejsonasjson
21
21
frominvokeimportLocal
22
22
frominvoke.contextimportContext
23
+
importtempfile
23
24
24
25
from .commonimportBoard
25
26
@@ -31,7 +32,28 @@ def data_dir(tmpdir_factory):
31
32
each test and deleted at the end, this way all the
32
33
tests work in isolation.
33
34
"""
34
-
returnstr(tmpdir_factory.mktemp("ArduinoTest"))
35
+
36
+
# it seems that paths generated by pytest's tmpdir_factory are too
37
+
# long and may lead to arduino-cli compile failures due to the
38
+
# combination of (some or all of) the following reasons:
39
+
# 1) Windows not liking path >260 chars in len
40
+
# 2) arm-gcc not fully optimizing long paths
41
+
# 3) libraries requiring headers deep down the include path
42
+
# for example:
43
+
#
44
+
# from C:\Users\runneradmin\AppData\Local\Temp\pytest-of-runneradmin\pytest-0\A7\packages\arduino\hardware\mbed\1.1.4\cores\arduino/mbed/rtos/Thread.h:29,
45
+
# from C:\Users\runneradmin\AppData\Local\Temp\pytest-of-runneradmin\pytest-0\A7\packages\arduino\hardware\mbed\1.1.4\cores\arduino/mbed/rtos/rtos.h:28,
46
+
# from C:\Users\runneradmin\AppData\Local\Temp\pytest-of-runneradmin\pytest-0\A7\packages\arduino\hardware\mbed\1.1.4\cores\arduino/mbed/mbed.h:23,
47
+
# from C:\Users\runneradmin\AppData\Local\Temp\pytest-of-runneradmin\pytest-0\A7\packages\arduino\hardware\mbed\1.1.4\cores\arduino/Arduino.h:32,
48
+
# from C:\Users\RUNNER~1\AppData\Local\Temp\arduino-sketch-739B2B6DD21EB014317DA2A46062811B\sketch\magic_wand.ino.cpp:1:
49
+
##[error]c:\users\runneradmin\appdata\local\temp\pytest-of-runneradmin\pytest-0\a7\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\c++\7.2.1\new:39:10: fatal error: bits/c++config.h: No such file or directory
50
+
#
51
+
# due to the above on Windows we cut the tmp path straight to /tmp/xxxxxxxx
0 commit comments