diff --git a/engine/src/flutter/ci/lint.sh b/engine/src/flutter/ci/lint.sh index e2698f255f..d6a25f7df9 100755 --- a/engine/src/flutter/ci/lint.sh +++ b/engine/src/flutter/ci/lint.sh @@ -33,7 +33,7 @@ DART_BIN="${SRC_DIR}/third_party/dart/tools/sdks/dart-sdk/bin" DART="${DART_BIN}/dart" PUB="${DART_BIN}/pub" -COMPILE_COMMANDS="$SRC_DIR/out/compile_commands.json" +COMPILE_COMMANDS="$SRC_DIR/out/host_debug/compile_commands.json" if [ ! -f "$COMPILE_COMMANDS" ]; then (cd "$SRC_DIR"; ./flutter/tools/gn) fi diff --git a/engine/src/flutter/tools/gn b/engine/src/flutter/tools/gn index 011e2f6275..b34d22be7e 100755 --- a/engine/src/flutter/tools/gn +++ b/engine/src/flutter/tools/gn @@ -459,6 +459,7 @@ def main(argv): '%s/flutter/third_party/gn/gn%s' % (SRC_ROOT, exe), 'gen', '--check', + '--export-compile-commands', ] if args.ide != '': @@ -487,30 +488,6 @@ def main(argv): print("Failed to generate gn files: ", exc.returncode, exc.output) sys.exit(1) - if gn_call_result == 0: - # Generate/Replace the compile commands database in out. - compile_cmd_gen_cmd = [ - 'ninja', - '-C', - out_dir, - '-t', - 'compdb', - 'cc', - 'cxx', - 'objc', - 'objcxx', - 'asm', - ] - - try: - contents = subprocess.check_output(compile_cmd_gen_cmd, cwd=SRC_ROOT) - except subprocess.CalledProcessError as exc: - print("Failed to run ninja: ", exc.returncode, exc.output) - sys.exit(1) - compile_commands = open('%s/out/compile_commands.json' % SRC_ROOT, 'w+') - compile_commands.write(contents) - compile_commands.close() - return gn_call_result if __name__ == '__main__':