mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-01 02:41:48 +00:00
[build] Add sourcelink support for windows pdbs (#2592)
SourceLink embeds the git repo and hash into the pdbs, which allows VS to get the source files exactly matching a pdb directly from github. Only VS and WinDbg are supported currently, but there are issues in the vscode tools repo to enable it there.
This commit is contained in:
@@ -10,8 +10,9 @@ nativeUtils {
|
||||
wpiVersion = "-1"
|
||||
niLibVersion = "2020.10.1"
|
||||
opencvVersion = "3.4.7-3"
|
||||
googleTestVersion = "1.9.0-4-437e100-1"
|
||||
googleTestVersion = "1.9.0-5-437e100-1"
|
||||
imguiVersion = "1.76-6"
|
||||
wpimathVersion = "-1"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,6 +22,7 @@ nativeUtils.wpi.addWarningsAsErrors()
|
||||
nativeUtils.wpi.addReleaseSymbolGeneration()
|
||||
|
||||
nativeUtils.setSinglePrintPerPlatform()
|
||||
nativeUtils.enableSourceLink()
|
||||
|
||||
nativeUtils.platformConfigs.each {
|
||||
if (it.name.contains('windows')) return
|
||||
@@ -147,6 +149,14 @@ ext.includeStandardZipFormat = { task, value ->
|
||||
task.from(binary.staticLibraryFile) {
|
||||
into nativeUtils.getPlatformPath(binary) + '/static'
|
||||
}
|
||||
def pdbDir = binary.staticLibraryFile.parentFile
|
||||
task.from(pdbDir) {
|
||||
include '*.pdb'
|
||||
into nativeUtils.getPlatformPath(binary) + '/static'
|
||||
}
|
||||
task.from(new File(pdbDir, "SourceLink.json")) {
|
||||
into nativeUtils.getPlatformPath(binary) + '/static'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user