Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d611d515 authored by Colin Cross's avatar Colin Cross Committed by android-build-merger
Browse files

Merge "Convert vulkan to Android.bp" am: e421c071 am: 78bde359 am: 4334bcd9

am: deae7951

Change-Id: Ie3fd9d269ea531d8eeb8139e1ef312d6d397c873
parents b93ce77c deae7951
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -20,6 +20,13 @@ ndk_headers {
    license: "include/vulkan/NOTICE",
    license: "include/vulkan/NOTICE",
}
}


cc_library_static {
    name: "vulkan_headers",
    export_include_dirs: ["include"],
}

subdirs = [
subdirs = [
    "nulldrv",
    "libvulkan",
    "libvulkan",
    "tools",
]
]

vulkan/Android.mk

deleted100644 → 0
+0 −1
Original line number Original line Diff line number Diff line
include $(call all-named-subdir-makefiles, libvulkan nulldrv tools)
+59 −0
Original line number Original line Diff line number Diff line
@@ -18,3 +18,62 @@ ndk_library {
    symbol_file: "libvulkan.map.txt",
    symbol_file: "libvulkan.map.txt",
    first_version: "24",
    first_version: "24",
}
}

cc_library_shared {
    name: "libvulkan",
    clang: true,
    sanitize: {
        misc_undefined: ["integer"],
    },

    cflags: [
        "-DLOG_TAG=\"vulkan\"",
        "-DVK_USE_PLATFORM_ANDROID_KHR",
        "-DVK_NO_PROTOTYPES",
        "-fvisibility=hidden",
        "-fstrict-aliasing",
        "-Weverything",
        "-Werror",
        "-Wno-padded",
        "-Wno-switch-enum",
        "-Wno-undef",

        //"-DLOG_NDEBUG=0",
    ],

    cppflags: [
        "-std=c++14",
        "-Wno-c99-extensions",
        "-Wno-c++98-compat-pedantic",
        "-Wno-exit-time-destructors",
        "-Wno-global-constructors",
        "-Wno-zero-length-array",
    ],

    srcs: [
        "api.cpp",
        "api_gen.cpp",
        "debug_report.cpp",
        "driver.cpp",
        "driver_gen.cpp",
        "layers_extensions.cpp",
        "stubhal.cpp",
        "swapchain.cpp",
        "vulkan_loader_data.cpp",
    ],

    export_static_lib_headers: ["vulkan_headers"],
    static_libs: [
        "vulkan_headers",
        "libziparchive",
    ],
    shared_libs: [
        "libhardware",
        "libsync",
        "libbase",
        "liblog",
        "libutils",
        "libcutils",
        "libz",
    ],
}

vulkan/libvulkan/Android.mk

deleted100644 → 0
+0 −58
Original line number Original line Diff line number Diff line
# Copyright 2015 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_CLANG := true
LOCAL_SANITIZE := integer

LOCAL_CFLAGS := -DLOG_TAG=\"vulkan\" \
	-DVK_USE_PLATFORM_ANDROID_KHR \
	-DVK_NO_PROTOTYPES \
	-std=c99 -fvisibility=hidden -fstrict-aliasing \
	-Weverything -Werror \
	-Wno-padded \
	-Wno-switch-enum \
	-Wno-undef

#LOCAL_CFLAGS += -DLOG_NDEBUG=0
LOCAL_CPPFLAGS := -std=c++14 \
	-Wno-c99-extensions \
	-Wno-c++98-compat-pedantic \
	-Wno-exit-time-destructors \
	-Wno-global-constructors \
	-Wno-zero-length-array

LOCAL_C_INCLUDES := \
	frameworks/native/vulkan/include \
	system/core/libsync/include

LOCAL_SRC_FILES := \
	api.cpp \
	api_gen.cpp \
	debug_report.cpp \
	driver.cpp \
	driver_gen.cpp \
	layers_extensions.cpp \
	stubhal.cpp \
	swapchain.cpp \
	vulkan_loader_data.cpp
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk

LOCAL_STATIC_LIBRARIES := libziparchive
LOCAL_SHARED_LIBRARIES := libhardware libsync libbase liblog libutils libcutils libz

LOCAL_MODULE := libvulkan
include $(BUILD_SHARED_LIBRARY)
+47 −0
Original line number Original line Diff line number Diff line
// Copyright 2015 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

cc_library_shared {
    // Real drivers would set this to vulkan.$(TARGET_BOARD_PLATFORM)
    name: "vulkan.default",
    proprietary: true,
    relative_install_path: "hw",

    clang: true,
    cflags: [
        "-fvisibility=hidden",
        "-fstrict-aliasing",
        "-DLOG_TAG=\"vknulldrv\"",
        "-Weverything",
        "-Werror",
        "-Wno-padded",
        "-Wno-undef",
        "-Wno-zero-length-array",

        "-DLOG_NDEBUG=0",
    ],
    cppflags: [
        "-std=c++1y",
        "-Wno-c++98-compat-pedantic",
        "-Wno-c99-extensions",
    ],

    srcs: [
        "null_driver.cpp",
        "null_driver_gen.cpp",
    ],

    static_libs: ["vulkan_headers"],
    shared_libs: ["liblog"],
}
Loading