Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: LDFLAGS are not honored during libimpulse generation #47

Open
mmitch opened this issue Dec 21, 2020 · 0 comments
Open

build: LDFLAGS are not honored during libimpulse generation #47

mmitch opened this issue Dec 21, 2020 · 0 comments

Comments

@mmitch
Copy link
Owner

mmitch commented Dec 21, 2020

The Code Coverage build workflow needs some extra flags to enable code coverage statistics.
These flags don't work with the generation of impulse.h (LDFLAGS seems to be ignored), so the workflow currently adopts a two-step build:

- name: Build impulsegen
# this builds impulsegen without coverage - LDFLAGS are not honored during build, so it would fail otherwise :/
run: |
./configure
make impulse.h
- name: Build with coverage
# this builds gbsplay with coverage enabled with GCC
env:
CFLAGS: '-O0 -coverage'
LDFLAGS: '-lgcov -coverage'
run: |
./configure
make gbsplay
- name: Test with coverage
# run the test under coverage
run: |
./gbsplay -c examples/gbsplayrc_sample -E b -o stdout examples/nightmode.gbs >/dev/null
gcov *.o

  1. impulse.h is generated with default flags, thus impulsegen.c is not considered covered code
  2. the remaining build is run again, this time with coverage enabled

Can we make this work in a single pass without changing the build flags in the middle?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant