From b74887e4e5d2042de64f429a348a6eb84c80f977 Mon Sep 17 00:00:00 2001 From: Cullen Walsh Date: Fri, 13 Dec 2024 14:11:37 -0800 Subject: [PATCH] Add jvm packages for ubuntu/fedora and setup include paths Summary: Necessary for facebookinternal/fizz builds Reviewed By: zpao Differential Revision: D67216319 fbshipit-source-id: 8d8a76a7fb2ce3263224a2e1d0373ff5206589f9 --- third-party/jvm/BUCK | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/third-party/jvm/BUCK b/third-party/jvm/BUCK index 88188c5..906b634 100644 --- a/third-party/jvm/BUCK +++ b/third-party/jvm/BUCK @@ -9,9 +9,26 @@ load("@//third-party:defs.bzl", "system_library") oncall("open_source") +FEDORA_JVM_ROOT = "/usr/lib/jvm/java-23-openjdk-23.0.1.0.11-1.rolling.fc40.x86_64" + +UBUNTU_JVM_ROOT = "/usr/lib/jvm/java-21-openjdk-amd64" + system_library( name = "jvm", + exported_preprocessor_flags = select({ + "//os:linux-fedora": [ + "-I{root}/include/".format(root = FEDORA_JVM_ROOT), + "-I{root}/include/linux/".format(root = FEDORA_JVM_ROOT), + ], + "//os:linux-ubuntu": [ + "-I{root}/include/".format(root = UBUNTU_JVM_ROOT), + "-I{root}/include/linux/".format(root = UBUNTU_JVM_ROOT), + ], + "DEFAULT": [], + }), packages = { + "//os:linux-fedora": ["java-latest-openjdk-devel"], + "//os:linux-ubuntu": ["openjdk-21-jdk-headless"], "//os:macos-homebrew": ["openjdk"], }, )