This is an automated email from the ASF dual-hosted git repository.

ccollins pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-newt.git

commit 825b29cee649deed283982a5204a431c8453508d
Author: Christopher Collins <ccoll...@apache.org>
AuthorDate: Tue Oct 8 16:19:29 2019 -0700

    Export more toolchain path env vars
    
    These environment variables get exported for custom commands to use.
    The three new environment variables are:
    
        MYNEWT_OBJCOPY_PATH
        MYNEWT_OBJDUMP_PATH
        MYNEWT_SIZE_PATH
---
 newt/builder/buildutil.go  | 11 +++++++----
 newt/toolchain/compiler.go | 12 ++++++++++++
 2 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/newt/builder/buildutil.go b/newt/builder/buildutil.go
index 65a24ad..e7d8c4d 100644
--- a/newt/builder/buildutil.go
+++ b/newt/builder/buildutil.go
@@ -175,10 +175,13 @@ func BasicEnvVars(binBase string, bspPkg *pkg.BspPackage) 
map[string]string {
 
 func ToolchainEnvVars(c *toolchain.Compiler) map[string]string {
        return map[string]string{
-               "MYNEWT_CC_PATH":  c.GetCcPath(),
-               "MYNEWT_CPP_PATH": c.GetCppPath(),
-               "MYNEWT_AS_PATH":  c.GetAsPath(),
-               "MYNEWT_AR_PATH":  c.GetArPath(),
+               "MYNEWT_AR_PATH":      c.GetArPath(),
+               "MYNEWT_AS_PATH":      c.GetAsPath(),
+               "MYNEWT_CC_PATH":      c.GetCcPath(),
+               "MYNEWT_CPP_PATH":     c.GetCppPath(),
+               "MYNEWT_OBJCOPY_PATH": c.GetObjcopyPath(),
+               "MYNEWT_OBJDUMP_PATH": c.GetObjdumpPath(),
+               "MYNEWT_SIZE_PATH":    c.GetSizePath(),
        }
 }
 
diff --git a/newt/toolchain/compiler.go b/newt/toolchain/compiler.go
index 6831d7a..5473fa6 100644
--- a/newt/toolchain/compiler.go
+++ b/newt/toolchain/compiler.go
@@ -127,6 +127,18 @@ func (c *Compiler) GetArPath() string {
        return c.arPath
 }
 
+func (c *Compiler) GetObjcopyPath() string {
+       return c.ocPath
+}
+
+func (c *Compiler) GetObjdumpPath() string {
+       return c.odPath
+}
+
+func (c *Compiler) GetSizePath() string {
+       return c.osPath
+}
+
 func (c *Compiler) GetLdResolveCircularDeps() bool {
        return c.ldResolveCircularDeps
 }

Reply via email to