summaryrefslogtreecommitdiff
path: root/data/syntax-highlighting
diff options
context:
space:
mode:
authorJunjie Mao <junjie.mao@hotmail.com>2024-08-15 19:44:08 +0800
committerEli Schwartz <eschwartz93@gmail.com>2024-08-15 02:24:50 -0400
commit85e92331cba16f038115be241e87634f69f74e78 (patch)
treeb8b89af6dc668944c43e411273805a2ba821add9 /data/syntax-highlighting
parentdb22551ed9d2dd7889abea01cc1c7bba02bf1c75 (diff)
downloadmeson-85e92331cba16f038115be241e87634f69f74e78.tar.gz
compilers: do not strip '-isystem' from C build arguments
Meson accidentally strips '-isystem' from C build args like ['-isystem', '/path/to/headers'] if the compiler includes the current working directory in the header search paths. The root cause is that '-isystem'[8:] evaluates to an empty string and os.path.realpath('') returns the absolute path to the current working directory, causing meson to think that '-isystem' specifies a default include path. Different compiler versions varies whether the current working directory is in its search paths. For example, on Ubuntu 21.04: # gcc -xc -v -E - gcc version 10.3.0 (Ubuntu 10.3.0-1ubuntu1) #include "..." search starts here: #include <...> search starts here: . /usr/lib/gcc/x86_64-linux-gnu/10/include /usr/local/include /usr/include/x86_64-linux-gnu /usr/include End of search list. While on Ubuntu 24.04: # gcc -xc -v -E - gcc version 13.2.0 (Ubuntu 13.2.0-23ubuntu4) ... #include "..." search starts here: #include <...> search starts here: /usr/lib/gcc/x86_64-linux-gnu/13/include /usr/local/include /usr/include/x86_64-linux-gnu /usr/include End of search list. Do not check the '-isystem=' and '-isystem/path/to/header' cases when the option is '-isystem' but the path that follows is not a default search path. Signed-off-by: Junjie Mao <junjie.mao@hotmail.com>
Diffstat (limited to 'data/syntax-highlighting')
0 files changed, 0 insertions, 0 deletions