ARMmbed / yotta

DEPRECATED: yotta build; better software
Apache License 2.0
164 stars 64 forks source link

Added 'strip' option to build system to allow not generating debugging symbols #813

Closed donatieng closed 6 years ago

donatieng commented 7 years ago

Sometimes it is useful being able to compile without debug symbols being generated (CMake's Release build type as opposed to RelWithDebInfo).

This commit addresses this by adding a "--strip" option to yotta. Debugging symbols are just not generated in that case (as opposed to being stripped) but I'm trying to be consistent with the naming. Could update it though.

donatieng commented 7 years ago

Looks like a bunch of Mercurial-related tests are failing because CI's public key is not registered with your bitbucket testing repo:

HgException: Error running hg --cwd . --encoding UTF-8 clone ssh://hg@bitbucket.org/autopulated/hg-testing-dummy /tmp/tmpD3ZZaG:
    Err: abort: no suitable response from remote hg!

    Out: remote: Permission denied (publickey).
thegecko commented 7 years ago

Thanks, I'll look into the build problem

thegecko commented 7 years ago

Build system fixed

donatieng commented 7 years ago

Perfect thanks, I'll update the pull request tomorrow.

On 28 June 2017 at 00:58, Rob Moran notifications@github.com wrote:

Build system fixed

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ARMmbed/yotta/pull/813#issuecomment-311518551, or mute the thread https://github.com/notifications/unsubscribe-auth/AER8tv0s_tKg2cIkTBAreBXvZUuuKVdGks5sIZcPgaJpZM4N_bDK .

-- Donatien Garnier Founder & CEO, AppNearMe

donatien.garnier@appnearme.com +44 1223 968 701

http://www.micronfcstack.com/ http://www.appnearme.com http://twitter.com/AppNearMe

AppNearMe Ltd IdeaSpace 3 Charles Babbage Road Cambridge CB3 0GT United Kingdom

donatieng commented 7 years ago

I meant build_type will always be a string which never evaluates to False

On 28 June 2017 at 00:08, Rob Moran notifications@github.com wrote:

@thegecko commented on this pull request.

In yotta/lib/target.py https://github.com/ARMmbed/yotta/pull/813#discussion_r124418673:

@@ -484,7 +484,7 @@ def build(self, builddir, component, args, release_build=False, build_args=None, targets = []

in the future this may be specified in the target description, but

for now we only support cmake, so everything is simple:

  • build_type = ('Debug', 'RelWithDebInfo')[release_build]
  • build_type = ('Debug', 'RelWithDebInfo', 'Release')[(2 if strip else 1) if release_build else 0] if build_type:

if --release-build=False is passed, it may run the Debug build type.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ARMmbed/yotta/pull/813#discussion_r124418673, or mute the thread https://github.com/notifications/unsubscribe-auth/AER8th91WaKygdf8DhyzUalWcAzjtUTwks5sIYtxgaJpZM4N_bDK .

-- Donatien Garnier Founder & CEO, AppNearMe

donatien.garnier@appnearme.com +44 1223 968 701

http://www.micronfcstack.com/ http://www.appnearme.com http://twitter.com/AppNearMe

AppNearMe Ltd IdeaSpace 3 Charles Babbage Road Cambridge CB3 0GT United Kingdom

thegecko commented 7 years ago

@donatieng Any update for this PR? Thanks!

donatieng commented 6 years ago

Sorry, got caught up with a few other things - just updated the PR now :)

donatieng commented 6 years ago

What do you think guys, is it mergeable as is or does it require further work?

thegecko commented 6 years ago

LGTM, will rebase and merge after tests pass

thegecko commented 6 years ago

Thanks for this addition, @donatieng