More MCP work
This commit is contained in:
10
build.py
10
build.py
@@ -323,6 +323,7 @@ def build_compile_commands_from_integration():
|
||||
if len(clangs) != 1: sys.exit("Couldn't identify correct clang++ compiler in UnrealEngine thirdparty directory")
|
||||
clang = str(clangs[0])
|
||||
# Build the table of source files and RSP files.
|
||||
# First, scan unity Module.*.o.rsp files and expand their #included .cpp files.
|
||||
mods1 = Path(f"{INTEGRATION}/Intermediate/Build/{OS}").rglob(f"UnrealEditor/{DEBUG}/**/Module.*.o.rsp")
|
||||
mods1p = Path(f"{INTEGRATION}/Plugins").rglob(f"Intermediate/Build/{OS}/x64/UnrealEditor/{DEBUG}/**/Module.*.o.rsp")
|
||||
mods2 = Path(f"{UNREALENGINE}/Engine/Intermediate/Build/{OS}").rglob("UnrealEditor/Development/**/Module.*.o.rsp")
|
||||
@@ -334,6 +335,15 @@ def build_compile_commands_from_integration():
|
||||
for subfile in cpp_files_included_by(cpp):
|
||||
abs = os.path.abspath(os.path.join(f"{UNREALENGINE}/Engine/Source", subfile))
|
||||
cpp_to_rsp[abs] = rsp
|
||||
# Also pick up non-unity .cpp files that have their own .o.rsp (e.g. files
|
||||
# excluded from unity builds). Only include if the .cpp file actually exists.
|
||||
standalone1 = Path(f"{INTEGRATION}/Intermediate/Build/{OS}").rglob(f"UnrealEditor/{DEBUG}/**/*.cpp.o.rsp")
|
||||
standalone1p = Path(f"{INTEGRATION}/Plugins").rglob(f"Intermediate/Build/{OS}/x64/UnrealEditor/{DEBUG}/**/*.cpp.o.rsp")
|
||||
for rsp_path in itertools.chain(standalone1, standalone1p):
|
||||
rsp = str(rsp_path)
|
||||
cpp = os.path.abspath(rsp.removesuffix(".o.rsp"))
|
||||
if cpp not in cpp_to_rsp and os.path.exists(cpp):
|
||||
cpp_to_rsp[cpp] = rsp
|
||||
# Generate compile commands.
|
||||
entries = []
|
||||
ccdir = f"{UNREALENGINE}/Engine/Source"
|
||||
|
||||
Reference in New Issue
Block a user