mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-22 14:43:55 +08:00
lint: drop CXX argument
The "fatal error: 'stddef.h' file not found" error is caused by incomplete installation of IWYU, which can be fixed directly. See https://github.com/include-what-you-use/include-what-you-use/issues/100
This commit is contained in:
parent
a0f785c90f
commit
ba64ec6e91
|
@ -653,9 +653,9 @@ depend: | show-MKDIR_P
|
||||||
# TODO - why not have the Makefile run lint.fish on actual files itself (generate a report target?)
|
# TODO - why not have the Makefile run lint.fish on actual files itself (generate a report target?)
|
||||||
#
|
#
|
||||||
lint:
|
lint:
|
||||||
$v build_tools/lint.fish "$(CXX)" $(CXXFLAGS) $(CPPFLAGS)
|
$v build_tools/lint.fish -- $(CXXFLAGS) $(CPPFLAGS)
|
||||||
lint-all:
|
lint-all:
|
||||||
$v build_tools/lint.fish --all "$(CXX)" $(CXXFLAGS) $(CPPFLAGS)
|
$v build_tools/lint.fish --all -- $(CXXFLAGS) $(CPPFLAGS)
|
||||||
.PHONY: lint lint-all
|
.PHONY: lint lint-all
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -13,19 +13,7 @@ set all no
|
||||||
set kernel_name (uname -s)
|
set kernel_name (uname -s)
|
||||||
set machine_type (uname -m)
|
set machine_type (uname -m)
|
||||||
|
|
||||||
argparse -s a/all -- $argv
|
argparse a/all -- $argv
|
||||||
set -q argv[1]; and set -gx CXX $argv[1]
|
|
||||||
set -e argv[1]
|
|
||||||
|
|
||||||
if test $kernel_name = Linux
|
|
||||||
# This is an awful hack. However, the include-what-you-use program spews lots of errors like
|
|
||||||
# /usr/include/unistd.h:226:10: fatal error: 'stddef.h' file not found
|
|
||||||
# if we don't explicitly tell it where to find the system headers on Linux. See
|
|
||||||
# http://stackoverflow.com/questions/19642590/libtooling-cant-find-stddef-h-nor-other-headers/
|
|
||||||
set -l sys_includes ($CXX -v -c src/builtin.cpp 2>&1 | \
|
|
||||||
sed -n -e '/^#include <...> search/,/^End of search list/s/^ *//p')[2..-2]
|
|
||||||
set -x CPLUS_INCLUDE_PATH (string join ':' $sys_includes)
|
|
||||||
end
|
|
||||||
|
|
||||||
# We only want -D and -I options to be passed thru to cppcheck.
|
# We only want -D and -I options to be passed thru to cppcheck.
|
||||||
for arg in $argv
|
for arg in $argv
|
||||||
|
|
Loading…
Reference in New Issue
Block a user