Skip to content

Commit

Permalink
fmt.
Browse files Browse the repository at this point in the history
  • Loading branch information
aoli-al committed Apr 12, 2024
1 parent 4ed9636 commit 79337aa
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 16 deletions.
11 changes: 7 additions & 4 deletions jdk/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,23 @@ tasks.register<Copy>("copyDependencies") {


tasks.register<Exec>("jlink") {
var path = "${layout.buildDirectory.get().asFile}/libs"
var jdkPath = "${layout.buildDirectory.get().asFile}/java-inst"
/* delete(file(jdkPath)) */
var path = "${layout.buildDirectory.get().asFile}/libs"
var jdkPath = "${layout.buildDirectory.get().asFile}/java-inst"
/* delete(file(jdkPath)) */

if (!File(jdkPath).exists()) {
var runtimeJar = "$path/${project.name}-$version.jar"
val jarDir = file(path)

val jars = jarDir.listFiles { file -> file.extension == "jar" }
?.joinToString(separator = ":") { it.absolutePath }
?: "No JAR files found."
?: "No JAR files found."
val command = listOf("jlink", "-J-javaagent:$runtimeJar", "-J--module-path=$jars",
"-J--add-modules=cmu.pasta.sfuzz.jdk", "-J--class-path=$jars",
"--output=$jdkPath", "--add-modules=ALL-MODULE-PATH", "--sfuzz-instrumentation")
println(command.joinToString(" "))
commandLine(command)
/* commandLine(listOf("java", "--version")) */
dependsOn(tasks.jar)
}
}
24 changes: 12 additions & 12 deletions jvmti/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
plugins {
id("io.github.tomtzook.gradle-cmake") version "1.2.2"
id("io.github.tomtzook.gradle-cmake") version "1.2.2"
}

cmake {
targets {
register("native_release") {
cmakeLists.set(file("src/CMakeLists.txt"))
cmakeArgs.add("-DCMAKE_BUILD_TYPE=Release")
}
register("native_debug") {
cmakeLists.set(file("src/CMakeLists.txt"))
cmakeArgs.add("-DCMAKE_BUILD_TYPE=Debug")
}
targets {
register("native_release") {
cmakeLists.set(file("src/CMakeLists.txt"))
cmakeArgs.add("-DCMAKE_BUILD_TYPE=Release")
}
register("native_debug") {
cmakeLists.set(file("src/CMakeLists.txt"))
cmakeArgs.add("-DCMAKE_BUILD_TYPE=Debug")
}
}
}

tasks.register("clean") {
dependsOn("cmakeClean")
dependsOn("cmakeClean")
}

tasks.register("build") {
dependsOn("cmakeBuild")
dependsOn("cmakeBuild")
}

0 comments on commit 79337aa

Please sign in to comment.