-
Notifications
You must be signed in to change notification settings - Fork 158
Open
Description
got this error when compiling abseil library.
in _get_files
assert source_file_candidates, f"No source files found in compile args: {compile_action.arguments}.\nPlease file an issue with this information!"
AssertionError: No source files found in compile args: ['external/bazel_tools~cc_configure_extension~local_config_cc/cc_wrapper.sh', '-xc++-header', '-fsyntax-only', '-U_FORTIFY_SOURCE', '-fstack-protector', '-Wall', '-Wthread-safety', '-Wself-assign', '-Wunused-but-set-parameter', '-Wno-free-nonheap-object', '-fcolor-diagnostics', '-fno-omit-frame-pointer', '-g', '-std=c++17', '-MD', '-MF', 'bazel-out/k8-dbg/bin/external/abseil-cpp~/absl/log/_objs/absl_log/absl_log.h.d', '-iquote', 'external/abseil-cpp~', '-iquote', 'bazel-out/k8-dbg/bin/external/abseil-cpp~', '-std=c++20', '-Xclang', '-fno-modules-validate-textual-header-includes', '-Wall', '-Wextra', '-Wcast-qual', '-Wconversion', '-Wfloat-overflow-conversion', '-Wfloat-zero-conversion', '-Wfor-loop-analysis', '-Wformat-security', '-Wgnu-redeclared-enum', '-Winfinite-recursion', '-Winvalid-constexpr', '-Wliteral-conversion', '-Wmissing-declarations', '-Woverlength-strings', '-Wpointer-arith', '-Wself-assign', '-Wshadow-all', '-Wshorten-64-to-32', '-Wsign-conversion', '-Wstring-conversion', '-Wtautological-overlap-compare', '-Wtautological-unsigned-zero-compare', '-Wundef', '-Wuninitialized', '-Wunreachable-code', '-Wunused-comparison', '-Wunused-local-typedefs', '-Wunused-result', '-Wvla', '-Wwrite-strings', '-Wno-float-conversion', '-Wno-implicit-float-conversion', '-Wno-implicit-int-float-conversion', '-Wno-unknown-warning-option', '-DNOMINMAX', '-no-canonical-prefixes', '-Wno-builtin-macro-redefined', '-D__DATE__="redacted"', '-D__TIMESTAMP__="redacted"', '-D__TIME__="redacted"', '-c', 'external/abseil-cpp~/absl/log/absl_log.h', '-o', 'bazel-out/k8-dbg/bin/external/abseil-cpp~/absl/log/_objs/absl_log/absl_log.h.processed'].
Please file an issue with this information!
bazel-compile-commands-extractor/refresh.template.py
Lines 613 to 621 in 1e08f8e
def _get_files(compile_action): | |
"""Gets the ({source files}, {header files}) clangd should be told the command applies to.""" | |
# Getting the source file is a little trickier than it might seem. | |
# First, we do the obvious thing: Filter args to those that look like source files. | |
source_file_candidates = [arg for arg in compile_action.arguments if not arg.startswith('-') and arg.endswith(_get_files.source_extensions)] | |
assert source_file_candidates, f"No source files found in compile args: {compile_action.arguments}.\nPlease file an issue with this information!" | |
source_file = source_file_candidates[0] |
This command seems try to generate a preprocessed header file, so it contains no cpp source files.
Metadata
Metadata
Assignees
Labels
No labels