File: sqlite.BUILD

package info (click to toggle)
perfetto 54.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 133,812 kB
  • sloc: cpp: 338,350; python: 74,464; sql: 46,895; ansic: 18,340; javascript: 2,557; java: 2,160; sh: 1,444; yacc: 776; xml: 563; makefile: 226
file content (82 lines) | stat: -rw-r--r-- 2,175 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Copyright (C) 2019 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.

# This build file is used for both @perfetto_dep_sqlite and
# @perfetto_dep_sqlite_src.

load("@perfetto_cfg//:perfetto_cfg.bzl", "PERFETTO_CONFIG")

# #############################
# @perfetto_dep_sqlite section
# #############################

filegroup(
    name = "headers",
    srcs = [
        "sqlite3.h",
        "sqlite3ext.h",
    ],
    visibility = ["//visibility:public"],
)

include_sqlite = [
    ".",
]

sqlite_copts = [
    "-Wno-misleading-indentation",
    "-DSQLITE_THREADSAFE=0",
    "-DSQLITE_DEFAULT_MEMSTATUS=0",
    "-DSQLITE_LIKE_DOESNT_MATCH_BLOBS",
    "-DSQLITE_OMIT_DEPRECATED",
    "-DSQLITE_OMIT_SHARED_CACHE",
    "-DHAVE_USLEEP",
    "-DHAVE_UTIME",
    "-DSQLITE_BYTEORDER=1234",
    "-DSQLITE_DEFAULT_AUTOVACUUM=0",
    "-DSQLITE_DEFAULT_MMAP_SIZE=0",
    "-DSQLITE_CORE",
    "-DSQLITE_TEMP_STORE=3",
    "-DSQLITE_OMIT_LOAD_EXTENSION",
    "-DSQLITE_OMIT_RANDOMNESS",
    "-DSQLITE_OMIT_AUTOINIT",
    "-DSQLITE_ENABLE_JSON1",
    "-DSQLITE_ENABLE_MATH_FUNCTIONS",
] + PERFETTO_CONFIG.deps_copts.sqlite

cc_library(
    name = "sqlite",
    srcs = [
        "sqlite3.c",
        "sqlite3.h",
    ],
    hdrs = [":headers"],
    copts = sqlite_copts,
    includes = include_sqlite,
    visibility = ["//visibility:public"],
)

# ################################
# @perfetto_dep_sqlite_src section
# ################################

cc_library(
    name = "percentile_ext",
    srcs = [
        "ext/misc/percentile.c",
    ],
    copts = sqlite_copts,
    deps = PERFETTO_CONFIG.deps.sqlite,
    visibility = ["//visibility:public"],
)