2018-02-06 06:13:54 +01:00
|
|
|
--- Bear-2.3.11-src/bear/main.py.in 1970-01-01 01:00:01.000000000 +0100
|
|
|
|
+++ Bear-2.3.11-src-patch/bear/main.py.in 1970-01-01 01:00:01.000000000 +0100
|
|
|
|
@@ -49,6 +49,7 @@
|
2016-11-03 15:27:03 +01:00
|
|
|
import shutil
|
|
|
|
import contextlib
|
|
|
|
import logging
|
|
|
|
+from distutils.spawn import find_executable
|
|
|
|
|
2018-02-06 06:13:54 +01:00
|
|
|
# Map of ignored compiler option for the creation of a compilation database.
|
|
|
|
# This map is used in _split_command method, which classifies the parameters
|
|
|
|
@@ -540,7 +541,11 @@
|
|
|
|
any(pattern.match(cmd) for pattern in COMPILER_PATTERNS_CXX)
|
2016-11-03 15:27:03 +01:00
|
|
|
|
2018-02-06 06:13:54 +01:00
|
|
|
if command: # not empty list will allow to index '0' and '1:'
|
|
|
|
- executable = os.path.basename(command[0]) # type: str
|
|
|
|
+ absolute_executable = os.path.realpath(find_executable(command[0]))
|
|
|
|
+ if 'wrapper' in absolute_executable:
|
|
|
|
+ return None
|
2016-11-03 15:27:03 +01:00
|
|
|
+
|
2018-02-06 06:13:54 +01:00
|
|
|
+ executable = os.path.basename(absolute_executable) # type: str
|
|
|
|
parameters = command[1:] # type: List[str]
|
|
|
|
# 'wrapper' 'parameters' and
|
|
|
|
# 'wrapper' 'compiler' 'parameters' are valid.
|