--- icu4c/source/common/BUILD.bazel +++ icu4c/source/common/BUILD.bazel @@ -43,37 +43,26 @@ cc_library( cc_library( name = "platform", - srcs = [ - "cmemory.cpp", - "uobject.cpp", - "cstring.cpp", - "cwchar.cpp", - "uinvchar.cpp", - "charstr.cpp", - "unistr.cpp", - "appendable.cpp", - "stringpiece.cpp", - "ustrtrns.cpp", - "ustring.cpp", - "ustrfmt.cpp", - "utf_impl.cpp", - "putil.cpp", - "ucln_cmn.cpp", - "udataswp.cpp", - "umath.cpp", - "umutex.cpp", - "sharedobject.cpp", - "utrace.cpp", - "fixedstring.cpp", - ], + srcs = glob([ + "*.h", + "*.cpp", + ]), deps = [ ":headers", # omit other deps b/c they are sys symbols + "@rules_cc//cc/runfiles", + ], + data = [ + "@icu_dat", ], local_defines = [ "U_COMMON_IMPLEMENTATION", + "ICU_DATA_DIR_BAZEL=\\\"$(rlocationpath @icu_dat)\\\"", ], - linkopts = ["-ldl"], + linkopts = select({ + "@platforms//os:linux": ["-ldl"], + "//conditions:default": [], + }), ) cc_library(