@@ -43,6 +43,8 @@ def jmods_dir = "$buildDir/jmods"
43
43
def jextract_jmod_file = " $jmods_dir /org.openjdk.jextract.jmod"
44
44
def jextract_jmod_inputs = " $buildDir /jmod_inputs"
45
45
def jextract_app_dir = " $buildDir /jextract"
46
+ def jextract_runtime_dir = " $jextract_app_dir /runtime"
47
+ def jextract_bin_dir = " $jextract_app_dir /bin"
46
48
def clang_include_dir = " ${ llvm_home} /lib/clang/${ clang_version} /include"
47
49
checkPath(clang_include_dir)
48
50
def os_lib_dir = Os . isFamily(Os . FAMILY_WINDOWS )? " bin" : " lib"
@@ -118,21 +120,22 @@ task createJextractImage(type: Exec) {
118
120
119
121
doFirst {
120
122
delete(jextract_app_dir)
123
+ project. mkdir " ${ jextract_bin_dir} "
121
124
}
122
125
123
126
executable = " ${ jdk22_home} /bin/jlink"
124
127
args = [
125
128
" --module-path=$jmods_dir " ,
126
129
" --add-modules=org.openjdk.jextract" ,
127
- " --output=${ jextract_app_dir } /runtime " ,
130
+ " --output=${ jextract_runtime_dir } " ,
128
131
" --strip-debug" , " --no-man-pages" , " --no-header-files" ,
129
132
" --add-options" ,
130
133
" ${ quote_jlink_opts} "
131
134
]
132
135
133
136
doLast {
134
137
// Add launcher scripts
135
- Path unixOut = Path . of(" ${ jextract_app_dir } /jextract" );
138
+ Path unixOut = Path . of(" ${ jextract_bin_dir } /jextract" );
136
139
Files . copy(Path . of(" $projectDir /src/main/jextract" ), unixOut);
137
140
if (unixOut. getFileSystem(). supportedFileAttributeViews(). contains(" posix" )) {
138
141
Set<PosixFilePermission > perms = Files . getPosixFilePermissions(unixOut);
@@ -142,7 +145,7 @@ task createJextractImage(type: Exec) {
142
145
Files . setPosixFilePermissions(unixOut, perms);
143
146
}
144
147
145
- Files . copy(Path . of(" $projectDir /src/main/jextract.bat" ), Path . of(" ${ jextract_app_dir } /jextract.bat" ))
148
+ Files . copy(Path . of(" $projectDir /src/main/jextract.bat" ), Path . of(" ${ jextract_bin_dir } /jextract.bat" ))
146
149
}
147
150
}
148
151
@@ -153,7 +156,7 @@ assemble.dependsOn(createJextractImage)
153
156
task verify (type : Exec ) {
154
157
dependsOn createJextractImage
155
158
156
- executable = " ${ jextract_app_dir } /jextract${ os_script_extension} "
159
+ executable = " ${ jextract_bin_dir } /jextract${ os_script_extension} "
157
160
args = [ " test.h" , " --output" , " $buildDir /integration_test" ]
158
161
}
159
162
0 commit comments