Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: tools/clang/blink_gc_plugin/CMakeLists.txt

Issue 1141793003: Update from https://crrev.com/329939 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # This line is read by update.sh and other scripts in tools/clang/scripts
2 # Note: The spaces are significant.
3 set(LIBRARYNAME BlinkGCPlugin) 1 set(LIBRARYNAME BlinkGCPlugin)
4 2
5 add_llvm_loadable_module("lib${LIBRARYNAME}" 3 set(plugin_sources
6 BlinkGCPlugin.cpp 4 BlinkGCPlugin.cpp
7 Edge.cpp 5 Edge.cpp
8 RecordInfo.cpp 6 RecordInfo.cpp)
9 )
10 7
11 add_dependencies("lib${LIBRARYNAME}" clang) 8 if(WIN32)
9 # Clang doesn't support loadable modules on Windows. Unfortunately, building
10 # the plugin as a static library and linking clang against it doesn't work.
11 # Since clang doesn't reference any symbols in our static library, the linker
12 # strips it out completely.
13 # Instead, we rely on the fact that the SOURCES property of a target is no
14 # read-only after CMake 3.1 and use it to compile the plugin directly into
15 # clang...
16 cmake_minimum_required(VERSION 3.1)
17 # Paths must be absolute, since we're modifying a target in another directory.
18 set(absolute_sources "")
19 foreach(source ${plugin_sources})
20 list(APPEND absolute_sources ${CMAKE_CURRENT_SOURCE_DIR}/${source})
21 endforeach()
22 set_property(TARGET clang APPEND PROPERTY SOURCES ${absolute_sources})
12 23
13 cr_install(TARGETS "lib${LIBRARYNAME}" LIBRARY DESTINATION lib) 24 cr_add_test(blink_gc_plugin_test
25 python
26 ${CMAKE_CURRENT_SOURCE_DIR}/tests/test.py
27 ${CMAKE_BINARY_DIR}/bin/clang
28 )
29 else()
30 add_llvm_loadable_module("lib${LIBRARYNAME}" ${plugin_sources})
31 add_dependencies("lib${LIBRARYNAME}" clang)
14 32
15 cr_add_test(blink_gc_plugin_test 33 cr_install(TARGETS "lib${LIBRARYNAME}" LIBRARY DESTINATION lib)
16 ${CMAKE_CURRENT_SOURCE_DIR}/tests/test.sh 34
17 ${CMAKE_BINARY_DIR}/bin/clang 35 cr_add_test(blink_gc_plugin_test
18 $<TARGET_FILE:lib${LIBRARYNAME}> 36 python
19 ) 37 ${CMAKE_CURRENT_SOURCE_DIR}/tests/test.py
38 ${CMAKE_BINARY_DIR}/bin/clang
39 $<TARGET_FILE:lib${LIBRARYNAME}>
40 )
41 endif()
OLDNEW
« no previous file with comments | « third_party/tcmalloc/vendor/packages/rpm/rpm.spec ('k') | tools/clang/blink_gc_plugin/tests/.gitignore » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698