Skip to content

Commit

Permalink
safestringlib: add a Android.bp file
Browse files Browse the repository at this point in the history
  • Loading branch information
xianju6x committed Apr 10, 2020
1 parent 245c4b8 commit 3266c50
Showing 1 changed file with 129 additions and 0 deletions.
129 changes: 129 additions & 0 deletions Android.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
cc_defaults {
name: "safestringlib_defaults",
cflags: [
"-Wall",
"-DSTDC_HEADERS",
"-fstack-protector-strong",
"-O2",
"-D_FORTIFY_SOURCE=2",
"-fPIE",
"-fPIC",
"-Wformat",
"-Wformat-security",
"-Wno-unused-parameter",
"-Wno-pointer-sign",
],
ldflags: [
"-z noexecstack",
"-z relro",
"-z now",
],
}

cc_defaults {
name: "safestringlib_sources",
srcs: [
"safeclib/abort_handler_s.c",
"safeclib/ignore_handler_s.c",
"safeclib/memcmp16_s.c",
"safeclib/memcmp32_s.c",
"safeclib/memcmp_s.c",
"safeclib/memcpy16_s.c",
"safeclib/memcpy32_s.c",
"safeclib/memcpy_s.c",
"safeclib/memmove16_s.c",
"safeclib/memmove32_s.c",
"safeclib/memmove_s.c",
"safeclib/mem_primitives_lib.c",
"safeclib/memset16_s.c",
"safeclib/memset32_s.c",
"safeclib/memset_s.c",
"safeclib/memzero16_s.c",
"safeclib/memzero32_s.c",
"safeclib/memzero_s.c",
"safeclib/safe_mem_constraint.c",
"safeclib/safe_str_constraint.c",
"safeclib/snprintf_support.c",
"safeclib/stpcpy_s.c",
"safeclib/stpncpy_s.c",
"safeclib/strcasecmp_s.c",
"safeclib/strcasestr_s.c",
"safeclib/strcat_s.c",
"safeclib/strcmpfld_s.c",
"safeclib/strcmp_s.c",
"safeclib/strcpyfldin_s.c",
"safeclib/strcpyfldout_s.c",
"safeclib/strcpyfld_s.c",
"safeclib/strcpy_s.c",
"safeclib/strcspn_s.c",
"safeclib/strfirstchar_s.c",
"safeclib/strfirstdiff_s.c",
"safeclib/strfirstsame_s.c",
"safeclib/strisalphanumeric_s.c",
"safeclib/strisascii_s.c",
"safeclib/strisdigit_s.c",
"safeclib/strishex_s.c",
"safeclib/strislowercase_s.c",
"safeclib/strismixedcase_s.c",
"safeclib/strispassword_s.c",
"safeclib/strisuppercase_s.c",
"safeclib/strlastchar_s.c",
"safeclib/strlastdiff_s.c",
"safeclib/strlastsame_s.c",
"safeclib/strljustify_s.c",
"safeclib/strncat_s.c",
"safeclib/strncpy_s.c",
"safeclib/strnlen_s.c",
"safeclib/strnterminate_s.c",
"safeclib/strpbrk_s.c",
"safeclib/strprefix_s.c",
"safeclib/strremovews_s.c",
"safeclib/strspn_s.c",
"safeclib/strstr_s.c",
"safeclib/strtok_s.c",
"safeclib/strtolowercase_s.c",
"safeclib/strtouppercase_s.c",
"safeclib/strzero_s.c",
"safeclib/wcpcpy_s.c",
"safeclib/wcscat_s.c",
"safeclib/wcscpy_s.c",
"safeclib/wcsncat_s.c",
"safeclib/wcsncpy_s.c",
"safeclib/wcsnlen_s.c",
"safeclib/wmemcmp_s.c",
"safeclib/wmemcpy_s.c",
"safeclib/wmemmove_s.c",
"safeclib/wmemset_s.c",
],
}

cc_library_shared {
name: "libsafestring",
defaults: [
"safestringlib_defaults",
"safestringlib_sources",
],
vendor: true,
include_dirs: [
"hardware/intel/external/safestringlib/include",
],
export_include_dirs: [
"include",
],
}


cc_library_static {
name: "libsafestring_static",
defaults: [
"safestringlib_defaults",
"safestringlib_sources",
],
vendor_available: true,
include_dirs: [
"hardware/intel/external/safestringlib/include",
],
export_include_dirs: [
"include",
],
}

0 comments on commit 3266c50

Please sign in to comment.