You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/01/15 07:37:16 UTC

[GitHub] ccollins476ad closed pull request #125: Newt - Add -DMYNEWT=1 to cflags.

ccollins476ad closed pull request #125: Newt - Add -DMYNEWT=1 to cflags.
URL: https://github.com/apache/mynewt-newt/pull/125
 
 
   

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 2c849a1..383469e 100644
--- a/newt/builder/build.go
+++ b/newt/builder/build.go
@@ -456,8 +456,11 @@ func (b *Builder) PrepBuild() error {
 	baseCi.Includes = append(baseCi.Includes,
 		GeneratedIncludeDir(b.targetPkg.rpkg.Lpkg.Name()))
 
-	// Note: Compiler flags get added at the end, after the flags for library
-	// package being built are calculated.
+	// Let multiplatform libraries know that a Mynewt binary is being build.
+	baseCi.Cflags = append(baseCi.Cflags, "-DMYNEWT=1")
+
+	// Note: The compiler package's flags get added at the end, after the flags
+	// for library package being built are calculated.
 	b.compilerInfo = baseCi
 
 	return nil


 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services