[M120 Migration][VD] Remove accessing oom_score_adj in zygote process
[platform/framework/web/chromium-efl.git] / third_party / unrar / BUILD.gn
1 # Copyright 2018 The Chromium Authors
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 config("unrar_warnings") {
6   cflags = [
7     # unrar frequently drops parentheses around logical ops
8     "-Wno-logical-op-parentheses",
9
10     # unrar frequently has dangling elses
11     "-Wno-dangling-else",
12
13     # unrar has several non-exhaustive switch statements
14     "-Wno-switch",
15
16     # unrar has several unused functions
17     "-Wno-unused-function",
18
19     # unrar has missing braces for initialization in rarvm.cpp
20     "-Wno-missing-braces",
21   ]
22 }
23
24 static_library("unrar") {
25   sources = [
26     "google/unrar_wrapper.cc",
27     "google/unrar_wrapper.h",
28     "src/archive.cpp",
29     "src/arcread.cpp",
30     "src/blake2s.cpp",
31     "src/cmddata.cpp",
32     "src/consio.cpp",
33     "src/crc.cpp",
34     "src/crypt.cpp",
35     "src/encname.cpp",
36     "src/errhnd.cpp",
37     "src/extinfo.cpp",
38     "src/extract.cpp",
39     "src/filcreat.cpp",
40     "src/file.cpp",
41     "src/filefn.cpp",
42     "src/filestr.cpp",
43     "src/find.cpp",
44     "src/getbits.cpp",
45     "src/global.cpp",
46     "src/hash.cpp",
47     "src/headers.cpp",
48     "src/list.cpp",
49     "src/match.cpp",
50     "src/options.cpp",
51     "src/pathfn.cpp",
52     "src/qopen.cpp",
53     "src/rarvm.cpp",
54     "src/rawread.cpp",
55     "src/rdwrfn.cpp",
56     "src/recvol.cpp",
57     "src/resource.cpp",
58     "src/rijndael.cpp",
59     "src/rs.cpp",
60     "src/rs16.cpp",
61     "src/scantree.cpp",
62     "src/secpassword.cpp",
63     "src/sha1.cpp",
64     "src/sha256.cpp",
65     "src/smallfn.cpp",
66     "src/strfn.cpp",
67     "src/strlist.cpp",
68     "src/system.cpp",
69     "src/threadpool.cpp",
70     "src/timefn.cpp",
71     "src/ui.cpp",
72     "src/unicode.cpp",
73     "src/unpack.cpp",
74     "src/volume.cpp",
75   ]
76   if (is_win) {
77     sources += [ "src/isnt.cpp" ]
78   }
79
80   configs -= [ "//build/config/compiler:chromium_code" ]
81   configs += [
82     "//build/config/compiler:no_chromium_code",
83
84     # This must be after no_chromium_code for warning flags to be ordered
85     # correctly.
86     ":unrar_warnings",
87   ]
88
89   defines = [
90     "_FILE_OFFSET_BITS=64",
91     "LARGEFILE_SOURCE",
92     "RAR_SMP",
93     "SILENT",
94     "NOVOLUME",
95
96     # The following is set to disable certain macro definitions in the unrar
97     # source code.
98     "CHROMIUM_UNRAR",
99
100     # Disables exceptions in unrar, replaces them with process termination.
101     "UNRAR_NO_EXCEPTIONS",
102   ]
103
104   deps = [ "//base" ]
105 }