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: cleanup compiler output #3686

Merged
merged 1 commit into from
May 14, 2020

Conversation

jb55
Copy link
Collaborator

@jb55 jb55 commented May 1, 2020

Hide our CFLAGS and LDFLAGS line noise each time an object file is compiled
or linked.

Also add a make show-flags command for displaying CC, LD, CFLAGS and
LDFLAG information. This is shown at the start of each build.

$ make

CC: gcc -DBINTOPKGLIBEXECDIR="../libexec/c-lightning" -Wall [..]
LD: gcc   -Og    -Lexternal -lwallycore -lsecp256k1 -ljsmn  [..]
...
cc ccan/ccan/crypto/shachain/shachain.c -DSHACHAIN_BITS=48
cc lightningd/test/run-jsonrpc.c
cc lightningd/test/run-invoice-select-inchan.c
cc lightningd/test/run-log-pruning.c
cc lightningd/test/run-find_my_abspath.c
cc cli/test/run-large-input.c
cc cli/test/run-remove-hint.c
ld lightningd/lightning_hsmd
ld lightningd/lightning_gossipd
ld lightningd/lightning_openingd
ld lightningd/lightning_channeld
ld lightningd/lightning_closingd
...

@cdecker
Copy link
Member

cdecker commented May 1, 2020

Loving it, this will make Travis logs and other CI logs way easier to parse :-)

@rustyrussell
Copy link
Contributor

Meh, got off my lawn kids!

I like being able to literally cut and paste a failing line if necessary to reproduce.

However, if we're going to do this, let's do the standard "V=1" override which shows the complete cmdline, eg:

ifeq ($V,1)
VERBOSE = echo $(2); $(2)
else
VERBOSE = echo $(1); $(2)
endif

%.o: %.c
       @$(call VERBOSE, "cc $<", $(CC) $(CFLAGS) -c -o $@ $<)

?

@jb55
Copy link
Collaborator Author

jb55 commented May 4, 2020 via email

@rustyrussell
Copy link
Contributor

Meh, got off my lawn kids!
ok boomer

:)

I like being able to literally cut and paste a failing line if necessary to reproduce. However, if we're going to do this, let's do the standard "V=1" override which shows the complete cmdline, eg:
alternatively we could just print the show-flags at the end if it's too much to scroll up a bit. It's not too hard to add the V=1 thing so I'll just do that for now.

Yeah, but "you can construct the line" is not the same as "you can literally cut & paste it" since some lines are subtly different.

Also, 'Changelog-Changed: build: default compile output is prettier and much less verbose'?

Hide CFLAGS and LDFLAGS line noise each time an object file is compiled
or linked.

Also add a `make show-flags` command for displaying CC, LD, CFLAGS and
LDFLAG information. This is shown at the start of each build.

Use `V=1 make` to restore original output

make

  CC: gcc -DBINTOPKGLIBEXECDIR="../libexec/c-lightning" -Wall [..]
  LD: gcc   -Og    -Lexternal -lwallycore -lsecp256k1 -ljsmn  [..]
  ...
  cc wallet/test/run-db.c
  cc lightningd/test/run-jsonrpc.c
  cc lightningd/test/run-invoice-select-inchan.c
  cc lightningd/test/run-log-pruning.c
  cc lightningd/test/run-find_my_abspath.c
  cc cli/test/run-large-input.c
  cc cli/test/run-remove-hint.c
  ld lightningd/lightning_hsmd
  ld lightningd/lightning_gossipd
  ld lightningd/lightning_openingd
  ld lightningd/lightning_channeld
  ld lightningd/lightning_closingd
  ...

Signed-off-by: William Casarin <[email protected]>
Changelog-Changed: build: default compile output is prettier and much less verbose
@jb55 jb55 force-pushed the cleanup-compiler-output branch from 8b39ed7 to 6c56607 Compare May 13, 2020 01:47
@jb55
Copy link
Collaborator Author

jb55 commented May 13, 2020

@rustyrussell done

@cdecker
Copy link
Member

cdecker commented May 14, 2020

ACK 6c56607

@cdecker cdecker merged commit d6ede8d into ElementsProject:master May 14, 2020
@jb55 jb55 deleted the cleanup-compiler-output branch May 14, 2020 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants