浏览代码

LibJS: Link LibLocale publicly to ensure ICU data is available

Linking LibLocale publicly ensures that libicudata.a is also available
in all embedders of LibJS. Otherwise, ICU crashes in hard-to-track-down
ways at runtime when the data is not available.
Timothy Flynn 1 年之前
父节点
当前提交
fdacf8ebeb
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      Userland/Libraries/LibJS/CMakeLists.txt

+ 4 - 1
Userland/Libraries/LibJS/CMakeLists.txt

@@ -271,7 +271,10 @@ set(SOURCES
 )
 
 serenity_lib(LibJS js)
-target_link_libraries(LibJS PRIVATE LibCore LibCrypto LibFileSystem LibRegex LibSyntax LibLocale LibUnicode LibTimeZone)
+target_link_libraries(LibJS PRIVATE LibCore LibCrypto LibFileSystem LibRegex LibSyntax LibUnicode LibTimeZone)
+
+# Link LibLocale publicly to ensure ICU data (which is in libicudata.a) is available in any process using LibJS.
+target_link_libraries(LibJS PUBLIC LibLocale)
 
 # TODO: This is probably also needed on RISC-V.
 if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "i.86.*")