package { default_applicable_licenses: ["external_oj-libjdwp_license"], } // Added automatically by a large-scale-change that took the approach of // 'apply every license found to every target'. While this makes sure we respect // every license restriction, it may not be entirely correct. // // e.g. GPL in an MIT project might only apply to the contrib/ directory. // // Please consider splitting the single license below into multiple licenses, // taking care not to lose any license_kind information, and overriding the // default license using the 'licenses: [...]' property on targets as needed. // // For unused files, consider creating a 'fileGroup' with "//visibility:private" // to attach the license to, and including a comment whether the files may be // used in the current project. // See: http://go/android-license-faq license { name: "external_oj-libjdwp_license", visibility: [":__subpackages__"], license_kinds: [ "SPDX-license-identifier-Apache-2.0", "SPDX-license-identifier-GPL", "SPDX-license-identifier-GPL-2.0", "SPDX-license-identifier-GPL-with-classpath-exception", "SPDX-license-identifier-LGPL", ], license_text: [ "LICENSE", ], } java_binary_host { name: "jdwpgen", srcs: ["make/src/classes/build/tools/jdwpgen/*.java"], wrapper: "etc/jdwpgen.sh", manifest: "etc/manifest.txt", java_version: "1.8", } genrule { name: "jdwp_generated_headers", tools: ["jdwpgen"], cmd: "$(location jdwpgen) $(in) -include $(out)", srcs: ["make/data/jdwp/jdwp.spec"], out: ["JDWPCommands.h"], } cc_defaults { name: "upstream-jdwp-defaults", host_supported: true, device_supported: true, cflags: [ // Every supported android platform is little-endian. "-D_LITTLE_ENDIAN", "-Wall", "-Werror", "-Wno-unused-parameter", ], notice: "LICENSE", target: { darwin: { enabled: false, }, }, } cc_library_headers { name: "javavm_headers", export_include_dirs: [ "src/share/javavm/export", "src/solaris/javavm/export", ], host_supported: true, device_supported: true, apex_available: [ "com.android.art", "com.android.art.debug", ], min_sdk_version: "S", } cc_library_headers { name: "libnpt_headers", export_include_dirs: [ "src/share/npt", "src/solaris/npt", ], defaults: ["upstream-jdwp-defaults"], apex_available: [ "com.android.art", "com.android.art.debug", ], min_sdk_version: "S", } cc_library { name: "libnpt", srcs: [ "src/share/npt/*.c", "src/solaris/npt/*.c", ], header_libs: [ "javavm_headers", "libnpt_headers", ], defaults: ["upstream-jdwp-defaults"], apex_available: [ "com.android.art", "com.android.art.debug", ], min_sdk_version: "S", } cc_library_headers { name: "libjdwp_headers", export_include_dirs: [ "src/share/back", "src/share/back/export", "src/solaris/back", ], generated_headers: ["jdwp_generated_headers"], export_generated_headers: ["jdwp_generated_headers"], defaults: ["upstream-jdwp-defaults"], apex_available: [ "com.android.art", "com.android.art.debug", ], min_sdk_version: "S", } cc_library { name: "libjdwp", srcs: [ "src/share/back/*.c", "src/solaris/back/*.c", ], cflags: [ "-DLINUX", "-DJDWP_LOGGING", "-Wno-switch", "-Wno-logical-op-parentheses", "-Wno-logical-not-parentheses", "-Wno-sometimes-uninitialized", "-Wno-self-assign", "-Wno-unused-variable", "-Wno-unused-function", ], header_libs: [ "javavm_headers", "libjdwp_headers", "libnpt_headers", ], required: [ "libnpt", "libdt_socket", ], defaults: ["upstream-jdwp-defaults"], apex_available: [ "com.android.art", "com.android.art.debug", ], min_sdk_version: "S", } cc_library { name: "libdt_socket", srcs: [ "src/share/transport/socket/*.c", "src/solaris/transport/socket/*.c", ], local_include_dirs: [ "src/share/transport/socket", "src/solaris/transport/socket", ], header_libs: [ "javavm_headers", "libjdwp_headers", "libnpt_headers", ], required: ["libnpt"], defaults: ["upstream-jdwp-defaults"], apex_available: [ "com.android.art", "com.android.art.debug", ], min_sdk_version: "S", } genrule { name: "jdwp_generated_java", tools: ["jdwpgen"], cmd: "$(location jdwpgen) $(in) -jdi $(out)", srcs: ["make/data/jdwp/jdwp.spec"], out: ["JDWP.java"], } python_binary_host { name: "jdi_prop_gen", srcs: ["etc/jdigen.py"], main: "etc/jdigen.py", } genrule { name: "jdi_generated_properties", tools: ["jdi_prop_gen"], cmd: "$(location jdi_prop_gen) $(in) $(out)", out: ["jdi.java"], srcs: ["src/share/classes/com/sun/tools/jdi/resources/jdi.properties"], } // The classes needed to support JDI and debug remote processes. java_library_host { name: "jdi-support", srcs: [ // The JDI interface definition. "src/share/classes/com/sun/jdi/**/*.java", // The JDI interface implementation "src/share/classes/com/sun/tools/jdi/**/*.java", // The JDWP.java file that contains all the constants. ":jdwp_generated_java", // The properties class which holds information about the various connectors. ":jdi_generated_properties", ], exclude_srcs: [ // We don't support process attachment and lack some of the classes to even compile this file. "src/share/classes/com/sun/tools/jdi/ProcessAttachingConnector.java", ], services: ["etc/com.sun.jdi.connect.Connector"], java_version: "1.8", javacflags: ["-g"], notice: "LICENSE", }