question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to detect compiler flag changes?

See original GitHub issue

Hello,

I’m using Conan 1.0.4.

I’ve built a lot of dependencies with my darwin-toolchain as a build_requirement.

I had to add Bitcode support, so I’ve added the corresponding compiler flags -fembed-bitcode.

However, that had no impact on the package ID, and running conan install still installed the non-Bitcode binaries.

I thought about adding an option to my darwin-toolchain, but since this is a build_requirement it would have been discarded as soon as binary packages would have been created.

Is there a good way to prevent this issue? Apart from adding the option in every recipe I got?

Should the package ID depend on other things? Having a Gentoo-like flag handling might not be appropriate for Conan.

I did not dig a lot on that, but that seems like a tough problem!

EDIT: In this specific case, maybe bitcode should become a conan setting, it is specific to iOS (maybe watchOS and tvOS as well) but from my understanding it’s becoming widely used by iOS apps.

To help us debug your issue please explain:

  • I’ve read the CONTRIBUTING guide.
  • I’ve specified the Conan version, operating system version and any tool that can be relevant.
  • I’ve explained the steps to reproduce the error or the motivation/use case of the question/suggestion.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:1
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
paulocoutinhoxcommented, Apr 16, 2019

Hi,

Forgot, i create my own toolchain: https://github.com/ezored/conan-darwin-toolchain

We are using in our products without problems.

I put:

  • bitcode
  • arc
  • visibility

Thanks.

1reaction
theodelrieucommented, Feb 7, 2018

It seems the -fembed-bitcode-marker only places an empty bitcode at the end of the binary.

See this SO post for more detail.

I wonder how it is useful in any way then…

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to check support compile flag in autoconf for clang
Check /select your compiler first. The flag checks should then use Clang if that's the elected compiler. – Jonathan Leffler. Sep 28, 2018...
Read more >
Recommended compiler and linker flags for GCC
This article walks through a list of recommended build flags for when you compile your C or C++ programs with GCC. Do you...
Read more >
CMake: How to Inspect and Configure the Compiler - Dane Bulat
Inspecting the Default Compiler This section details how to find out which compiler and compiler flags CMake uses on your system by default....
Read more >
CPP/C++ Compiler Flags and Options
GCC and Clang Most common compiler flags: std - Specify the C++ version or ISO standard version. Turns on lots of compiler warning...
Read more >
The Best and Worst GCC Compiler Flags For Embedded
Typically, it's a very small set of changes required to fix the new issues detected. NOTE: I'd recommend enforcing a certain compiler ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found