Skip to content

Commit

Permalink
Stop linking ICU and CORE_FOUNDATION where possible
Browse files Browse the repository at this point in the history
Summary:
These libraries are only really used in the PlatformUnicode target, so
there is no need to link them into everything.

Reviewed By: tmikov

Differential Revision: D30657552

fbshipit-source-id: 00e4746251b458d5937e8e5aaccaaaa694bb9f05
  • Loading branch information
neildhar authored and facebook-github-bot committed Sep 1, 2021
1 parent db9ca5c commit af68186
Show file tree
Hide file tree
Showing 17 changed files with 0 additions and 41 deletions.
2 changes: 0 additions & 2 deletions API/hermes/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,9 @@ endif()
target_link_libraries(libhermes
jsi
${LIBHERMES_VM_DEP}
${CORE_FOUNDATION}
# Linker flags
${OPTIONAL_GC_SECTIONS}
)
hermes_link_icu(libhermes)

# Export the required header directory
target_include_directories(libhermes PUBLIC ..)
Expand Down
4 changes: 0 additions & 4 deletions android/intltest/java/com/facebook/hermes/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,8 @@ if(HERMES_IS_ANDROID)
compileJS
fbjni::fbjni
jsi
${CORE_FOUNDATION}
)
target_compile_options(jsijni PRIVATE -frtti -fexceptions)
hermes_link_icu(jsijni)

add_hermes_library(jsijniepi SHARED
${epi_source_files}
Expand All @@ -45,8 +43,6 @@ if(HERMES_IS_ANDROID)
compileJS
fbjni::fbjni
jsi
${CORE_FOUNDATION}
)
target_compile_options(jsijniepi PRIVATE -frtti -fexceptions)
hermes_link_icu(jsijniepi)
endif()
3 changes: 0 additions & 3 deletions lib/Platform/Intl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,10 @@ if(HERMES_IS_ANDROID)
add_hermes_library(hermesPlatformIntl STATIC ${source_files}
LINK_LIBS
fbjni::fbjni
${CORE_FOUNDATION}
)
set_source_files_properties(PlatformIntlAndroid.cpp PROPERTIES
COMPILE_FLAGS "-frtti -fexceptions -std=c++14")
else()
add_hermes_library(hermesPlatformIntl STATIC ${source_files}
LINK_LIBS
${CORE_FOUNDATION}
)
endif()
1 change: 0 additions & 1 deletion lib/Platform/Unicode/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ if(HERMES_IS_ANDROID)
add_hermes_library(hermesPlatformUnicode STATIC ${source_files}
LINK_LIBS
fbjni::fbjni
${CORE_FOUNDATION}
)
set_source_files_properties(PlatformUnicodeJava.cpp PROPERTIES
COMPILE_FLAGS "-frtti -fexceptions -std=c++14")
Expand Down
2 changes: 0 additions & 2 deletions lib/Support/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,3 @@ add_hermes_library(hermesSupport
LEB128.cpp
LINK_LIBS ${link_libs}
)

hermes_link_icu(hermesSupport)
1 change: 0 additions & 1 deletion lib/VM/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ set(link_libs
hermesPlatformIntl
hermesInternalBytecode
dtoa
${CORE_FOUNDATION}
)

add_hermes_library(hermesVMRuntime STATIC ${source_files}
Expand Down
2 changes: 0 additions & 2 deletions tools/hbc-attribute/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,3 @@ add_hermes_tool(hbc-attribute
target_link_libraries(hbc-attribute
hermesHBCBackend
)

hermes_link_icu(hbc-attribute)
2 changes: 0 additions & 2 deletions tools/hbc-deltaprep/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,3 @@ target_link_libraries(hbc-deltaprep
hermesHBCBackend
hermesSupport
)

hermes_link_icu(hbc-deltaprep)
3 changes: 0 additions & 3 deletions tools/hbc-diff/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,4 @@ target_link_libraries(hbc-diff
hermesHBCBackend
hermesSupport
hermesInst
${CORE_FOUNDATION}
)

hermes_link_icu(hbc-diff)
2 changes: 0 additions & 2 deletions tools/hbcdump/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ target_link_libraries(hbcdump
hermesSupport
)

hermes_link_icu(hbcdump)

install(TARGETS hbcdump
RUNTIME DESTINATION bin
)
2 changes: 0 additions & 2 deletions tools/hdb/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ target_link_libraries(hdb
hermesapi
)

hermes_link_icu(hdb)

install(TARGETS hdb
RUNTIME DESTINATION bin
)
3 changes: 0 additions & 3 deletions tools/hermes/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,9 @@ target_link_libraries(hermes
hermesSupport
dtoa
hermesInstrumentation
${CORE_FOUNDATION}
${LIBREADLINE}
)

hermes_link_icu(hermes)

install(TARGETS hermes
RUNTIME DESTINATION bin
)
2 changes: 0 additions & 2 deletions tools/hermesc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ target_link_libraries(hermesc
hermesSupport
)

hermes_link_icu(hermesc)

# The Hermes compiler is used as part of the build of the VM.
# During cross-compilation, the compiler needs to be built for the host system,
# then used to build the VM for the target system.
Expand Down
3 changes: 0 additions & 3 deletions tools/hvm-bench/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,4 @@ target_link_libraries(interp-dispatch-bench
hermesParser
hermesSupport
dtoa
${CORE_FOUNDATION}
)

hermes_link_icu(interp-dispatch-bench)
3 changes: 0 additions & 3 deletions tools/hvm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,8 @@ target_link_libraries(hvm
hermesParser
hermesSupport
dtoa
${CORE_FOUNDATION}
)

hermes_link_icu(hvm)

install(TARGETS hvm
RUNTIME DESTINATION bin
)
3 changes: 0 additions & 3 deletions unittests/PlatformUnicode/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,4 @@ add_hermes_unittest(PlatformUnicodeTests

target_link_libraries(PlatformUnicodeTests
hermesPlatformUnicode
${CORE_FOUNDATION}
)

hermes_link_icu(PlatformUnicodeTests)
3 changes: 0 additions & 3 deletions unittests/VMRuntime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,6 @@ target_link_libraries(HermesVMRuntimeTests
hermesParser
hermesSupport
dtoa
${CORE_FOUNDATION}
)

hermes_link_icu(HermesVMRuntimeTests)

add_subdirectory(Instrumentation)

0 comments on commit af68186

Please sign in to comment.