Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 161ae86

Browse files
committedSep 13, 2018
Merge remote-tracking branch 'upstream/master'
2 parents a891e65 + f9d69df commit 161ae86

File tree

6 files changed

+23
-8
lines changed

6 files changed

+23
-8
lines changed
 

‎arduino-builder/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ import (
5454
"github.com/go-errors/errors"
5555
)
5656

57-
const VERSION = "1.4.0"
57+
const VERSION = "1.4.1"
5858

5959
const FLAG_ACTION_COMPILE = "compile"
6060
const FLAG_ACTION_PREPROCESS = "preprocess"

‎builder_utils/utils.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -558,5 +558,10 @@ func GetCachedCoreArchiveFileName(fqbn, coreFolder string) string {
558558
coreFolder = absCoreFolder
559559
} // silently continue if absolute path can't be detected
560560
hash := utils.MD5Sum([]byte(coreFolder))
561-
return "core_" + fqbnToUnderscore + "_" + hash + ".a"
561+
realName := "core_" + fqbnToUnderscore + "_" + hash + ".a"
562+
if len(realName) > 100 {
563+
// avoid really long names, simply hash the final part
564+
realName = "core_" + utils.MD5Sum([]byte(fqbnToUnderscore+"_"+hash)) + ".a"
565+
}
566+
return realName
562567
}

‎constants/constants.go

+3
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,14 @@ const LOG_LEVEL_INFO = "info"
155155
const LOG_LEVEL_WARN = "warn"
156156
const MSG_ARCH_FOLDER_NOT_SUPPORTED = "'arch' folder is no longer supported! See http://goo.gl/gfFJzU for more information"
157157
const MSG_ARCHIVING_CORE_CACHE = "Archiving built core (caching) in: {0}"
158+
const MSG_ERROR_ARCHIVING_CORE_CACHE = "Error archiving built core (caching) in {0}: {1}"
159+
const MSG_CORE_CACHE_UNAVAILABLE = "Unable to cache built core, please tell {0} maintainers to follow http://goo.gl/QdCUjo"
158160
const MSG_BOARD_UNKNOWN = "Board {0} (platform {1}, package {2}) is unknown"
159161
const MSG_BOOTLOADER_FILE_MISSING = "Bootloader file specified but missing: {0}"
160162
const MSG_BUILD_OPTIONS_CHANGED = "Build options changed, rebuilding all"
161163
const MSG_CANT_FIND_SKETCH_IN_PATH = "Unable to find {0} in {1}"
162164
const MSG_FQBN_INVALID = "{0} is not a valid fully qualified board name. Required format is targetPackageName:targetPlatformName:targetBoardName."
165+
const MSG_FIND_INCLUDES_FAILED = "Error while detecting libraries included by {0}"
163166
const MSG_INVALID_QUOTING = "Invalid quoting: no closing [{0}] char found."
164167
const MSG_IGNORED_BUILTIN_TOOLS_TXT = "Skipping {0}; please consider removing that file since it may hurt older Arduino installations"
165168
const MSG_LIB_LEGACY = "(legacy)"

‎container_find_includes.go

+2-4
Original file line numberDiff line numberDiff line change
@@ -343,10 +343,8 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFile t
343343
return i18n.WrapError(preproc_err)
344344
} else {
345345
include = IncludesFinderWithRegExp(ctx, string(preproc_stderr))
346-
if include == "" {
347-
// No include found? Bail out.
348-
os.Stderr.Write(preproc_stderr)
349-
return i18n.WrapError(preproc_err)
346+
if include == "" && ctx.Verbose {
347+
ctx.GetLogger().Println(constants.LOG_LEVEL_DEBUG, constants.MSG_FIND_INCLUDES_FAILED, sourcePath)
350348
}
351349
}
352350
}

‎phases/core_builder.go

+9-2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
package phases
3131

3232
import (
33+
"os"
3334
"path/filepath"
3435

3536
"github.com/arduino/arduino-builder/builder_utils"
@@ -124,10 +125,16 @@ func compileCore(ctx *types.Context, buildPath string, buildCachePath string, bu
124125

125126
// archive core.a
126127
if targetArchivedCore != "" {
128+
err := builder_utils.CopyFile(archiveFile, targetArchivedCore)
127129
if ctx.Verbose {
128-
logger.Println(constants.LOG_LEVEL_INFO, constants.MSG_ARCHIVING_CORE_CACHE, targetArchivedCore)
130+
if err == nil {
131+
logger.Println(constants.LOG_LEVEL_INFO, constants.MSG_ARCHIVING_CORE_CACHE, targetArchivedCore)
132+
} else if os.IsNotExist(err) {
133+
logger.Println(constants.LOG_LEVEL_INFO, constants.MSG_CORE_CACHE_UNAVAILABLE, ctx.ActualPlatform.PlatformId)
134+
} else {
135+
logger.Println(constants.LOG_LEVEL_INFO, constants.MSG_ERROR_ARCHIVING_CORE_CACHE, targetArchivedCore, err)
136+
}
129137
}
130-
builder_utils.CopyFile(archiveFile, targetArchivedCore)
131138
}
132139

133140
return archiveFile, variantObjectFiles, nil

‎test/helper_tools_downloader.go

+2
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ func DownloadCoresAndToolsAndLibraries(t *testing.T) {
112112
OsUrl{Os: "i686-mingw32", Url: "http://downloads.arduino.cc/tools/ctags-5.8-arduino11-i686-mingw32.zip"},
113113
OsUrl{Os: "x86_64-apple-darwin", Url: "http://downloads.arduino.cc/tools/ctags-5.8-arduino11-x86_64-apple-darwin.zip"},
114114
OsUrl{Os: "arm-linux-gnueabihf", Url: "http://downloads.arduino.cc/tools/ctags-5.8-arduino11-armv6-linux-gnueabihf.tar.bz2"},
115+
OsUrl{Os: "aarch64-linux-gnu", Url: "http://downloads.arduino.cc/tools/ctags-5.8-arduino11-aarch64-linux-gnu.tar.bz2"},
115116
},
116117
},
117118
Tool{Name: "arduino-preprocessor", Version: "0.1.5",
@@ -121,6 +122,7 @@ func DownloadCoresAndToolsAndLibraries(t *testing.T) {
121122
OsUrl{Os: "i686-mingw32", Url: "https://github.com/arduino/arduino-preprocessor/releases/download/0.1.5/arduino-preprocessor-0.1.5-i686-w64-mingw32.tar.bz2"},
122123
OsUrl{Os: "x86_64-apple-darwin", Url: "https://github.com/arduino/arduino-preprocessor/releases/download/0.1.5/arduino-preprocessor-0.1.5-x86_64-apple-darwin11.tar.bz2"},
123124
OsUrl{Os: "arm-linux-gnueabihf", Url: "https://github.com/arduino/arduino-preprocessor/releases/download/0.1.5/arduino-preprocessor-0.1.5-arm-linux-gnueabihf.tar.bz2"},
125+
OsUrl{Os: "aarch64-linux-gnu", Url: "https://github.com/arduino/arduino-preprocessor/releases/download/0.1.5/arduino-preprocessor-0.1.5-aarch64-linux-gnu.tar.bz2"},
124126
},
125127
},
126128
}

0 commit comments

Comments
 (0)
Please sign in to comment.