File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -110,6 +110,7 @@ jobs:
110110 $simpleCode = @"
111111 // Simple file to ensure compiler is run
112112 #include <windows.h>
113+ #include <jni.h>
113114 #include "etw_provider.h"
114115 int main() { return 0; }
115116 "@
@@ -129,7 +130,20 @@ jobs:
129130
130131 # Try a minimal compile to help CodeQL recognize the files
131132 Write-Host "Running minimal compile..."
132- & cl.exe /c codeql_trigger.cpp /I"$headerDir" /I"$sourceDir" /EHsc
133+ # Print the Java home path to verify it
134+ Write-Host "Using JAVA_HOME: $env:JAVA_HOME"
135+ # Check if the JNI include directory exists
136+ $jniIncludePath = "$env:JAVA_HOME/include"
137+ $jniIncludeWinPath = "$env:JAVA_HOME/include/win32"
138+
139+ if (Test-Path $jniIncludePath) {
140+ Write-Host "JNI include path exists: $jniIncludePath"
141+ } else {
142+ Write-Host "WARNING: JNI include path doesn't exist: $jniIncludePath"
143+ }
144+
145+ # Compile with explicit include paths
146+ & cl.exe /c codeql_trigger.cpp /I"$headerDir" /I"$sourceDir" /I"$jniIncludePath" /I"$jniIncludeWinPath" /EHsc
133147
134148 Write-Host "C++ preparation completed successfully"
135149 echo "CPP_BUILD_SUCCEEDED=true" | Out-File -FilePath $env:GITHUB_ENV -Append
You can’t perform that action at this time.
0 commit comments