Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b8e52be0 authored by Jiri Olsa's avatar Jiri Olsa Committed by Arnaldo Carvalho de Melo
Browse files

perf build: Add feature-dump target



To provide FEATURE-DUMP into $(FEATURE_DUMP_COPY) if defined, with no
further action.

Get feature dump of the current build:
  $ make feature-dump
    BUILD:   Doing 'make -j4' parallel build

  Auto-detecting system features:
  ...                         dwarf: [ on  ]

  FEATURE-DUMP file available in FEATURE-DUMP

Get feature dump static build into /tmp/fd file:

  $ make feature-dump FEATURE_DUMP_COPY=/tmp/fd LDFLAGS=-static
    BUILD:   Doing 'make -j4' parallel build

  Auto-detecting system features:
  ...                         dwarf: [ OFF ]

  SNIP

  FEATURE-DUMP file copied into /tmp/fd

Suggested-by: default avatarWang Nan <wangnan0@huawei.com>
Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Cc: Zefan Li <lizefan@huawei.com>
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/r/1452830421-77757-6-git-send-email-wangnan0@huawei.com


Signed-off-by: default avatarWang Nan <wangnan0@huawei.com>
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent c15e758c
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -610,6 +610,17 @@ clean: $(LIBTRACEEVENT)-clean $(LIBAPI)-clean $(LIBBPF)-clean $(LIBSUBCMD)-clean
	$(QUIET_SUBDIR0)Documentation $(QUIET_SUBDIR1) clean
	$(python-clean)

#
# To provide FEATURE-DUMP into $(FEATURE_DUMP_COPY)
# file if defined, with no further action.
feature-dump:
ifdef FEATURE_DUMP_COPY
	@cp $(OUTPUT)FEATURE-DUMP $(FEATURE_DUMP_COPY)
	@echo "FEATURE-DUMP file copied into $(FEATURE_DUMP_COPY)"
else
	@echo "FEATURE-DUMP file available in $(OUTPUT)FEATURE-DUMP"
endif

#
# Trick: if ../../.git does not exist - we are building out of tree for example,
# then force version regeneration: