ASF GitHub Bot commented on MYNEWT-858:

ccollins476ad closed pull request #133: MYNEWT-858 Collect all package lflags 
during link.
URL: https://github.com/apache/mynewt-newt/pull/133

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/newt/builder/build.go b/newt/builder/build.go
index 383469e8..52ba48a3 100644
--- a/newt/builder/build.go
+++ b/newt/builder/build.go
@@ -372,6 +372,13 @@ func (b *Builder) link(elfName string, linkerScripts 
                        archiveNames[i] = filepath.ToSlash(archiveName)
                pkgNames = append(pkgNames, archiveNames...)
+               // Collect lflags from all constituent packages.
+               ci, err := bpkg.CompilerInfo(b)
+               if err != nil {
+                       return err
+               }
+               c.AddInfo(ci)
        c.LinkerScripts = linkerScripts


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

> Test package lflags ignored by `newt test`
> ------------------------------------------
>                 Key: MYNEWT-858
>                 URL: https://issues.apache.org/jira/browse/MYNEWT-858
>             Project: Mynewt
>          Issue Type: Bug
>      Security Level: Public(Viewable by anyone) 
>          Components: Newt
>            Reporter: Christopher Collins
>            Assignee: Sterling Hughes
>            Priority: Major
>              Labels: Newt
>             Fix For: v1_4_0_rel
> If you add the following to a test package:
> {noformat}
> pkg.lflags:
>     - "-foo"
> {noformat}
> and then test the package with `newt test`, the flag does not get passed to 
> gcc during linking.
> Newt currently only reads lflags from the following package types:
> * target
> * app
> * bsp
> * compiler
> At the very least, the test package's lflags should be used when a unit test 
> is linked via {{newt test}}.  Alternatively, it may make more sense to gather 
> the lflags from all constituent packages during the link phase.

This message was sent by Atlassian JIRA

Reply via email to