aboutsummaryrefslogtreecommitdiff
path: root/driver
diff options
context:
space:
mode:
authorFabian Meumertzheim <fabian@meumertzhe.im>2021-10-12 12:36:20 +0200
committerFabian Meumertzheim <fabian@meumertzhe.im>2021-10-18 22:31:42 +0200
commita0b181bfa5aa7f313afdaf9d0b96ab2584b54c62 (patch)
tree65e93ee34174ef824b4d18ed1c55f703bb977e12 /driver
parentb30fcfaf45358d002c8cb3112a907f32cebbd110 (diff)
downloadjazzer-api-a0b181bfa5aa7f313afdaf9d0b96ab2584b54c62.tar.gz
Add copts and linkopts for Windows
Diffstat (limited to 'driver')
-rw-r--r--driver/BUILD.bazel41
1 files changed, 28 insertions, 13 deletions
diff --git a/driver/BUILD.bazel b/driver/BUILD.bazel
index 7bfe858e..2385868c 100644
--- a/driver/BUILD.bazel
+++ b/driver/BUILD.bazel
@@ -59,9 +59,10 @@ cc_library(
"jvm_tooling.h",
"libfuzzer_driver.h",
],
- linkopts = [
- "-ldl",
- ],
+ linkopts = select({
+ "@platforms//os:windows": [],
+ "//conditions:default": ["-ldl"],
+ }),
# Needs to be linked statically for JNI_OnLoad_jazzer_initialize to be found
# by the JVM.
linkstatic = True,
@@ -112,9 +113,12 @@ cc_binary(
data = [
"//agent:jazzer_agent_deploy.jar",
],
- linkopts = [
- "-rdynamic",
- ] + select({
+ linkopts = select({
+ "@platforms//os:windows": [],
+ "//conditions:default": [
+ "-rdynamic",
+ ],
+ }) + select({
"//:clang_on_linux": ["-fuse-ld=lld"],
"//conditions:default": [],
}),
@@ -141,8 +145,12 @@ cc_binary(
linkopts = [
"-fsanitize=address",
"-static-libsan",
- "-rdynamic",
] + select({
+ "@platforms//os:windows": [],
+ "//conditions:default": [
+ "-rdynamic",
+ ],
+ }) + select({
"//:clang_on_linux": ["-fuse-ld=lld"],
"//conditions:default": [],
}),
@@ -166,8 +174,12 @@ cc_binary(
# Link UBSan statically, even on macOS.
"-static-libsan",
"-fsanitize-link-c++-runtime",
- "-rdynamic",
] + select({
+ "@platforms//os:windows": [],
+ "//conditions:default": [
+ "-rdynamic",
+ ],
+ }) + select({
"//:clang_on_linux": ["-fuse-ld=lld"],
"//conditions:default": [],
}),
@@ -191,11 +203,14 @@ cc_test(
"//driver/testdata:fuzz_target_mocks_deploy.jar",
],
includes = ["."],
- linkopts = [
- # Needs to export symbols dynamically for JNI_OnLoad_jazzer_initialize
- # to be found by the JVM.
- "-rdynamic",
- ],
+ linkopts = select({
+ "@platforms//os:windows": [],
+ "//conditions:default": [
+ # Needs to export symbols dynamically for JNI_OnLoad_jazzer_initialize
+ # to be found by the JVM.
+ "-rdynamic",
+ ],
+ }),
deps = [
":jvm_tooling_lib",
":test_main",