svf-tools 1.0.641 → 1.0.643

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/CMakeLists.txt +37 -82
  2. package/SVF-doxygen/html/html/menudata.js +1 -62
  3. package/SVF-doxygen/html/html/search/searchdata.js +0 -21
  4. package/package.json +1 -1
  5. package/svf/CMakeLists.txt +14 -14
  6. package/svf-llvm/CMakeLists.txt +50 -1
  7. package/svf-llvm/lib/LLVMModule.cpp +9 -3
  8. package/svf-llvm/tools/CFL/CMakeLists.txt +10 -0
  9. package/{tools → svf-llvm/tools}/CFL/cfl.cpp +0 -0
  10. package/svf-llvm/tools/CMakeLists.txt +22 -0
  11. package/svf-llvm/tools/DDA/CMakeLists.txt +10 -0
  12. package/{tools → svf-llvm/tools}/DDA/dda.cpp +0 -0
  13. package/svf-llvm/tools/Example/CMakeLists.txt +10 -0
  14. package/{tools → svf-llvm/tools}/Example/svf-ex.cpp +0 -0
  15. package/svf-llvm/tools/MTA/CMakeLists.txt +12 -0
  16. package/{tools → svf-llvm/tools}/MTA/LockResultValidator.cpp +0 -0
  17. package/{tools → svf-llvm/tools}/MTA/LockResultValidator.h +0 -0
  18. package/{tools → svf-llvm/tools}/MTA/MTAAnnotator.cpp +0 -0
  19. package/{tools → svf-llvm/tools}/MTA/MTAAnnotator.h +0 -0
  20. package/{tools → svf-llvm/tools}/MTA/MTAResultValidator.cpp +0 -0
  21. package/{tools → svf-llvm/tools}/MTA/MTAResultValidator.h +0 -0
  22. package/{tools → svf-llvm/tools}/MTA/mta.cpp +0 -0
  23. package/svf-llvm/tools/SABER/CMakeLists.txt +10 -0
  24. package/{tools → svf-llvm/tools}/SABER/saber.cpp +0 -0
  25. package/svf-llvm/tools/WPA/CMakeLists.txt +13 -0
  26. package/{tools → svf-llvm/tools}/WPA/wpa.cpp +0 -0
  27. package/tools/CFL/CMakeLists.txt +0 -23
  28. package/tools/CMakeLists.txt +0 -7
  29. package/tools/DDA/CMakeLists.txt +0 -23
  30. package/tools/Example/CMakeLists.txt +0 -23
  31. package/tools/MTA/CMakeLists.txt +0 -25
  32. package/tools/SABER/CMakeLists.txt +0 -23
  33. package/tools/WPA/CMakeLists.txt +0 -26
package/CMakeLists.txt CHANGED
@@ -5,89 +5,45 @@ project("SVF")
5
5
  configure_file(${CMAKE_SOURCE_DIR}/.config.in
6
6
  ${CMAKE_BINARY_DIR}/include/Util/config.h)
7
7
 
8
- # To support both in- and out-of-source builds, we check for the presence of the
9
- # add_llvm_loadable_module command. - if this command is not present, we are
10
- # building out-of-source
11
- if(NOT COMMAND add_llvm_library)
12
- # We need to match the build environment for LLVM: In particular, we need
13
- # C++14 and the -fno-rtti flag
14
- set(CMAKE_CXX_STANDARD 14)
15
- set(CMAKE_CXX_STANDARD_REQUIRED ON)
16
- # add -std=gnu++14
17
- set(CMAKE_CXX_EXTENSIONS ON)
18
-
19
- # Treat compiler warnings as errors
20
- add_compile_options("-Werror" "-Wall")
21
-
22
- # Keep assertions enabled if requested
23
- option(SVF_ENABLE_ASSERTIONS "Always enable assertions")
24
- if(SVF_ENABLE_ASSERTIONS)
25
- add_compile_options("-UNDEBUG")
26
- endif()
27
-
28
- find_package(LLVM REQUIRED CONFIG HINTS "${LLVM_DIR}")
29
-
30
- message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
31
- message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")
32
-
33
- if(NOT LLVM_ENABLE_RTTI)
34
- add_compile_options("-fno-rtti")
35
- message(STATUS "Disable RTTI")
36
- endif()
37
-
38
- if(NOT LLVM_ENABLE_EH)
39
- add_compile_options("-fno-exceptions")
40
- message(STATUS "Disable exceptions")
41
- endif()
42
-
43
- option(SVF_COVERAGE "Create coverage build")
44
- if(SVF_COVERAGE OR DEFINED ENV{SVF_COVERAGE})
45
- add_compile_options("-fprofile-arcs" "-ftest-coverage")
46
- add_link_options("-fprofile-arcs" "-ftest-coverage")
47
- message(STATUS "Enable coverage")
48
- endif()
49
-
50
- set(SVF_SANITIZE
51
- ""
52
- CACHE STRING "Create sanitizer build (address)")
53
- if(SVF_SANITIZE STREQUAL "address")
54
- add_compile_options("-fno-omit-frame-pointer" "-fsanitize=address")
55
- add_link_options("-fsanitize=address")
56
- message(STATUS "Sanitizer build: ${SVF_SANITIZE}")
57
- elseif(SVF_SANITIZE STREQUAL "thread")
58
- add_compile_options("-fsanitize=thread")
59
- add_link_options("-fsanitize=thread")
60
- message(STATUS "Sanitizer build: ${SVF_SANITIZE}")
61
- elseif(NOT SVF_SANITIZE STREQUAL "")
62
- message(ERROR "Unknown sanitizer type: ${SVF_SANITIZE}")
63
- endif()
64
-
65
- list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_DIR}")
66
- include(AddLLVM)
8
+ # We need to match the build environment for LLVM: In particular, we need C++14
9
+ # and the -fno-rtti flag
10
+ set(CMAKE_CXX_STANDARD 14)
11
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
12
+ # add -std=gnu++14
13
+ set(CMAKE_CXX_EXTENSIONS ON)
14
+
15
+ add_compile_options("-fno-rtti")
16
+ add_compile_options("-fno-exceptions")
17
+
18
+ # Treat compiler warnings as errors
19
+ add_compile_options("-Werror" "-Wall")
20
+
21
+ # Keep assertions enabled if requested
22
+ option(SVF_ENABLE_ASSERTIONS "Always enable assertions")
23
+ if(SVF_ENABLE_ASSERTIONS)
24
+ add_compile_options("-UNDEBUG")
25
+ endif()
67
26
 
68
- add_definitions(${LLVM_DEFINITIONS})
69
- # include_directories(SYSTEM ${LLVM_INCLUDE_DIRS})
27
+ option(SVF_COVERAGE "Create coverage build")
28
+ if(SVF_COVERAGE OR DEFINED ENV{SVF_COVERAGE})
29
+ add_compile_options("-fprofile-arcs" "-ftest-coverage")
30
+ add_link_options("-fprofile-arcs" "-ftest-coverage")
31
+ message(STATUS "Enable coverage")
32
+ endif()
70
33
 
71
- if(LLVM_LINK_LLVM_DYLIB)
72
- set(llvm_libs LLVM)
73
- else()
74
- llvm_map_components_to_libnames(
75
- llvm_libs
76
- analysis
77
- bitwriter
78
- core
79
- instcombine
80
- instrumentation
81
- ipo
82
- irreader
83
- linker
84
- scalaropts
85
- support
86
- target
87
- transformutils)
88
- endif()
89
- else()
90
- set(IN_SOURCE_BUILD 1)
34
+ set(SVF_SANITIZE
35
+ ""
36
+ CACHE STRING "Create sanitizer build (address)")
37
+ if(SVF_SANITIZE STREQUAL "address")
38
+ add_compile_options("-fno-omit-frame-pointer" "-fsanitize=address")
39
+ add_link_options("-fsanitize=address")
40
+ message(STATUS "Sanitizer build: ${SVF_SANITIZE}")
41
+ elseif(SVF_SANITIZE STREQUAL "thread")
42
+ add_compile_options("-fsanitize=thread")
43
+ add_link_options("-fsanitize=thread")
44
+ message(STATUS "Sanitizer build: ${SVF_SANITIZE}")
45
+ elseif(NOT SVF_SANITIZE STREQUAL "")
46
+ message(ERROR "Unknown sanitizer type: ${SVF_SANITIZE}")
91
47
  endif()
92
48
 
93
49
  find_library(
@@ -120,7 +76,6 @@ endif()
120
76
 
121
77
  add_subdirectory(svf)
122
78
  add_subdirectory(svf-llvm)
123
- add_subdirectory(tools)
124
79
 
125
80
  install(
126
81
  DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/svf/include/
@@ -1,63 +1,2 @@
1
1
  var menudata={children:[
2
- {text:"Main Page",url:"index.html"},
3
- {text:"Namespaces",url:"namespaces.html",children:[
4
- {text:"Namespace List",url:"namespaces.html"},
5
- {text:"Namespace Members",url:"namespacemembers.html",children:[
6
- {text:"All",url:"namespacemembers.html"},
7
- {text:"Typedefs",url:"namespacemembers_type.html"}]}]},
8
- {text:"Classes",url:"annotated.html",children:[
9
- {text:"Class List",url:"annotated.html"},
10
- {text:"Class Index",url:"classes.html"},
11
- {text:"Class Hierarchy",url:"hierarchy.html"},
12
- {text:"Class Members",url:"functions.html",children:[
13
- {text:"All",url:"functions.html",children:[
14
- {text:"_",url:"functions.html#index__"},
15
- {text:"a",url:"functions.html#index_a"},
16
- {text:"c",url:"functions.html#index_c"},
17
- {text:"d",url:"functions.html#index_d"},
18
- {text:"f",url:"functions.html#index_f"},
19
- {text:"g",url:"functions.html#index_g"},
20
- {text:"h",url:"functions.html#index_h"},
21
- {text:"i",url:"functions.html#index_i"},
22
- {text:"l",url:"functions.html#index_l"},
23
- {text:"m",url:"functions.html#index_m"},
24
- {text:"n",url:"functions.html#index_n"},
25
- {text:"p",url:"functions.html#index_p"},
26
- {text:"r",url:"functions.html#index_r"},
27
- {text:"s",url:"functions.html#index_s"},
28
- {text:"t",url:"functions.html#index_t"},
29
- {text:"v",url:"functions.html#index_v"},
30
- {text:"~",url:"functions.html#index_0x7e"}]},
31
- {text:"Functions",url:"functions_func.html",children:[
32
- {text:"a",url:"functions_func.html#index_a"},
33
- {text:"c",url:"functions_func.html#index_c"},
34
- {text:"d",url:"functions_func.html#index_d"},
35
- {text:"g",url:"functions_func.html#index_g"},
36
- {text:"h",url:"functions_func.html#index_h"},
37
- {text:"i",url:"functions_func.html#index_i"},
38
- {text:"l",url:"functions_func.html#index_l"},
39
- {text:"m",url:"functions_func.html#index_m"},
40
- {text:"p",url:"functions_func.html#index_p"},
41
- {text:"r",url:"functions_func.html#index_r"},
42
- {text:"s",url:"functions_func.html#index_s"},
43
- {text:"v",url:"functions_func.html#index_v"},
44
- {text:"~",url:"functions_func.html#index_0x7e"}]},
45
- {text:"Variables",url:"functions_vars.html",children:[
46
- {text:"_",url:"functions_vars.html#index__"},
47
- {text:"a",url:"functions_vars.html#index_a"},
48
- {text:"c",url:"functions_vars.html#index_c"},
49
- {text:"f",url:"functions_vars.html#index_f"},
50
- {text:"i",url:"functions_vars.html#index_i"},
51
- {text:"l",url:"functions_vars.html#index_l"},
52
- {text:"m",url:"functions_vars.html#index_m"},
53
- {text:"n",url:"functions_vars.html#index_n"},
54
- {text:"r",url:"functions_vars.html#index_r"},
55
- {text:"s",url:"functions_vars.html#index_s"},
56
- {text:"t",url:"functions_vars.html#index_t"},
57
- {text:"v",url:"functions_vars.html#index_v"}]},
58
- {text:"Typedefs",url:"functions_type.html"}]}]},
59
- {text:"Files",url:"files.html",children:[
60
- {text:"File List",url:"files.html"},
61
- {text:"File Members",url:"globals.html",children:[
62
- {text:"All",url:"globals.html"},
63
- {text:"Functions",url:"globals_func.html"}]}]}]}
2
+ {text:"Main Page",url:"index.html"}]}
@@ -1,33 +1,12 @@
1
1
  var indexSectionsWithContent =
2
2
  {
3
- 0: "_acdefghilmnprstvw~",
4
- 1: "almr",
5
- 2: "s",
6
- 3: "cdlmsw",
7
- 4: "acdefghilmprstv~",
8
- 5: "_acfilmnrstv",
9
- 6: "cilnrv"
10
3
  };
11
4
 
12
5
  var indexSectionNames =
13
6
  {
14
- 0: "all",
15
- 1: "classes",
16
- 2: "namespaces",
17
- 3: "files",
18
- 4: "functions",
19
- 5: "variables",
20
- 6: "typedefs"
21
7
  };
22
8
 
23
9
  var indexSectionLabels =
24
10
  {
25
- 0: "All",
26
- 1: "Classes",
27
- 2: "Namespaces",
28
- 3: "Files",
29
- 4: "Functions",
30
- 5: "Variables",
31
- 6: "Typedefs"
32
11
  };
33
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-tools",
3
- "version": "1.0.641",
3
+ "version": "1.0.643",
4
4
  "description": "* <b>[TypeClone](https://github.com/SVF-tools/SVF/wiki/TypeClone) published in our [ECOOP paper](https://yuleisui.github.io/publications/ecoop20.pdf) is now available in SVF </b> * <b>SVF now uses a single script for its build. Just type [`source ./build.sh`](https://github.com/SVF-tools/SVF/blob/master/build.sh) in your terminal, that's it!</b> * <b>SVF now supports LLVM-10.0.0! </b> * <b>We thank [bsauce](https://github.com/bsauce) for writing a user manual of SVF ([link1](https://www.jianshu.com/p/068a08ec749c) and [link2](https://www.jianshu.com/p/777c30d4240e)) in Chinese </b> * <b>SVF now supports LLVM-9.0.0 (Thank [Byoungyoung Lee](https://github.com/SVF-tools/SVF/issues/142) for his help!). </b> * <b>SVF now supports a set of [field-sensitive pointer analyses](https://yuleisui.github.io/publications/sas2019a.pdf). </b> * <b>[Use SVF as an external lib](https://github.com/SVF-tools/SVF/wiki/Using-SVF-as-a-lib-in-your-own-tool) for your own project (Contributed by [Hongxu Chen](https://github.com/HongxuChen)). </b> * <b>SVF now supports LLVM-7.0.0. </b> * <b>SVF now supports Docker. [Try SVF in Docker](https://github.com/SVF-tools/SVF/wiki/Try-SVF-in-Docker)! </b> * <b>SVF now supports [LLVM-6.0.0](https://github.com/svf-tools/SVF/pull/38) (Contributed by [Jack Anthony](https://github.com/jackanth)). </b> * <b>SVF now supports [LLVM-4.0.0](https://github.com/svf-tools/SVF/pull/23) (Contributed by Jared Carlson. Thank [Jared](https://github.com/jcarlson23) and [Will](https://github.com/dtzWill) for their in-depth [discussions](https://github.com/svf-tools/SVF/pull/18) about updating SVF!) </b> * <b>SVF now supports analysis for C++ programs.</b> <br />",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -4,20 +4,20 @@
4
4
  # individual sub projects here, rather than the combined project.
5
5
 
6
6
  file(
7
- GLOB
8
- SVF_CORE_SOURCES
9
- lib/AbstractExecution/*.cpp
10
- lib/CFL/*.cpp
11
- lib/DDA/*.cpp
12
- lib/FastCluster/*.cpp
13
- lib/Graphs/*.cpp
14
- lib/MemoryModel/*.cpp
15
- lib/MSSA/*.cpp
16
- lib/MTA/*.cpp
17
- lib/SABER/*.cpp
18
- lib/SVFIR/*.cpp
19
- lib/Util/*.cpp
20
- lib/WPA/*.cpp)
7
+ GLOB
8
+ SVF_CORE_SOURCES
9
+ lib/AbstractExecution/*.cpp
10
+ lib/CFL/*.cpp
11
+ lib/DDA/*.cpp
12
+ lib/FastCluster/*.cpp
13
+ lib/Graphs/*.cpp
14
+ lib/MemoryModel/*.cpp
15
+ lib/MSSA/*.cpp
16
+ lib/MTA/*.cpp
17
+ lib/SABER/*.cpp
18
+ lib/SVFIR/*.cpp
19
+ lib/Util/*.cpp
20
+ lib/WPA/*.cpp)
21
21
 
22
22
  # Refer to this link for detail:
23
23
  # https://stackoverflow.com/questions/68864536/cmake-linking-static-libraries-in-different-subdirectories-into-one-single-stati
@@ -1,3 +1,50 @@
1
+ # To support both in- and out-of-source builds, we check for the presence of the
2
+ # add_llvm_loadable_module command. - if this command is not present, we are
3
+ # building out-of-source
4
+ if(NOT COMMAND add_llvm_library)
5
+ find_package(LLVM REQUIRED CONFIG HINTS "${LLVM_DIR}")
6
+
7
+ message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
8
+ message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")
9
+
10
+ if(NOT LLVM_ENABLE_RTTI)
11
+ add_compile_options("-fno-rtti")
12
+ message(STATUS "Disable RTTI")
13
+ endif()
14
+
15
+ if(NOT LLVM_ENABLE_EH)
16
+ add_compile_options("-fno-exceptions")
17
+ message(STATUS "Disable exceptions")
18
+ endif()
19
+
20
+ list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_DIR}")
21
+ include(AddLLVM)
22
+
23
+ add_definitions(${LLVM_DEFINITIONS})
24
+ # include_directories(SYSTEM ${LLVM_INCLUDE_DIRS})
25
+
26
+ if(LLVM_LINK_LLVM_DYLIB)
27
+ set(llvm_libs LLVM)
28
+ else()
29
+ llvm_map_components_to_libnames(
30
+ llvm_libs
31
+ analysis
32
+ bitwriter
33
+ core
34
+ instcombine
35
+ instrumentation
36
+ ipo
37
+ irreader
38
+ linker
39
+ scalaropts
40
+ support
41
+ target
42
+ transformutils)
43
+ endif()
44
+ else()
45
+ set(IN_SOURCE_BUILD 1)
46
+ endif()
47
+
1
48
  # SVF-LLVM containes LLVM Libs
2
49
  file(GLOB SVFLLVM_SOURCES lib/*.cpp)
3
50
 
@@ -7,5 +54,7 @@ target_include_directories(SvfLLVM PUBLIC include)
7
54
  target_link_libraries(SvfLLVM PUBLIC ${Z3_LIBRARIES} SvfCoreObj)
8
55
 
9
56
  if(DEFINED IN_SOURCE_BUILD)
10
- add_dependencies(SvfLLVM intrinsics_gen)
57
+ add_dependencies(SvfLLVM intrinsics_gen)
11
58
  endif()
59
+
60
+ add_subdirectory(tools)
@@ -883,9 +883,15 @@ SVFConstantData* LLVMModuleSet::getSVFConstantData(const ConstantData* cd)
883
883
  SVFConstantData* svfcd = nullptr;
884
884
  if(const ConstantInt* cint = SVFUtil::dyn_cast<ConstantInt>(cd))
885
885
  {
886
- /// bool true will be translated to -1 with getSExtValue, so call getZExtValue() if bitwidth = 1
887
- svfcd = new SVFConstantInt(cd->getName().str(), getSVFType(cint->getType()), cint->getZExtValue(),
888
- cint->getBitWidth() == 1? cint->getZExtValue(): cint->getSExtValue());
886
+ /// bitwidth == 1 : cint has value from getZExtValue() because `bool true` will be translated to -1 using sign extension (i.e., getSExtValue).
887
+ /// bitwidth <=64 1 : cint has value from getSExtValue()
888
+ /// bitwidth >64 1 : cint has value 0 because it represents an invalid int
889
+ if(cint->getBitWidth() == 1)
890
+ svfcd = new SVFConstantInt(cd->getName().str(), getSVFType(cint->getType()), cint->getZExtValue(), cint->getZExtValue());
891
+ else if(cint->getBitWidth() <= 64 && cint->getBitWidth() > 1)
892
+ svfcd = new SVFConstantInt(cd->getName().str(), getSVFType(cint->getType()), cint->getZExtValue(), cint->getSExtValue());
893
+ else
894
+ svfcd = new SVFConstantInt(cd->getName().str(), getSVFType(cint->getType()), 0, 0);
889
895
  }
890
896
  else if(const ConstantFP* cfp = SVFUtil::dyn_cast<ConstantFP>(cd))
891
897
  {
@@ -0,0 +1,10 @@
1
+ if(DEFINED IN_SOURCE_BUILD)
2
+ add_llvm_tool(cfl cfl.cpp)
3
+ else()
4
+ add_executable(cfl cfl.cpp)
5
+
6
+ target_link_libraries(cfl SvfLLVM ${llvm_libs})
7
+
8
+ set_target_properties(cfl PROPERTIES RUNTIME_OUTPUT_DIRECTORY
9
+ ${CMAKE_BINARY_DIR}/bin)
10
+ endif()
File without changes
@@ -0,0 +1,22 @@
1
+ if(DEFINED IN_SOURCE_BUILD)
2
+ set(LLVM_LINK_COMPONENTS
3
+ BitWriter
4
+ Core
5
+ IPO
6
+ IrReader
7
+ InstCombine
8
+ Instrumentation
9
+ Target
10
+ Linker
11
+ Analysis
12
+ ScalarOpts
13
+ Support
14
+ SvfLLVM)
15
+ endif()
16
+
17
+ add_subdirectory(SABER)
18
+ add_subdirectory(WPA)
19
+ add_subdirectory(Example)
20
+ add_subdirectory(DDA)
21
+ add_subdirectory(MTA)
22
+ add_subdirectory(CFL)
@@ -0,0 +1,10 @@
1
+ if(DEFINED IN_SOURCE_BUILD)
2
+ add_llvm_tool(dvf dda.cpp)
3
+ else()
4
+ add_executable(dvf dda.cpp)
5
+
6
+ target_link_libraries(dvf SvfLLVM ${llvm_libs})
7
+
8
+ set_target_properties(dvf PROPERTIES RUNTIME_OUTPUT_DIRECTORY
9
+ ${CMAKE_BINARY_DIR}/bin)
10
+ endif()
File without changes
@@ -0,0 +1,10 @@
1
+ if(DEFINED IN_SOURCE_BUILD)
2
+ add_llvm_tool(svf-ex svf-ex.cpp)
3
+ else()
4
+ add_executable(svf-ex svf-ex.cpp)
5
+
6
+ target_link_libraries(svf-ex SvfLLVM ${llvm_libs})
7
+
8
+ set_target_properties(svf-ex PROPERTIES RUNTIME_OUTPUT_DIRECTORY
9
+ ${CMAKE_BINARY_DIR}/bin)
10
+ endif()
File without changes
@@ -0,0 +1,12 @@
1
+ if(DEFINED IN_SOURCE_BUILD)
2
+ add_llvm_tool(mta mta.cpp LockResultValidator.cpp MTAResultValidator.cpp
3
+ MTAAnnotator.cpp)
4
+ else()
5
+ add_executable(mta mta.cpp LockResultValidator.cpp MTAResultValidator.cpp
6
+ MTAAnnotator.cpp)
7
+
8
+ target_link_libraries(mta SvfLLVM ${llvm_libs})
9
+
10
+ set_target_properties(mta PROPERTIES RUNTIME_OUTPUT_DIRECTORY
11
+ ${CMAKE_BINARY_DIR}/bin)
12
+ endif()
File without changes
File without changes
File without changes
@@ -0,0 +1,10 @@
1
+ if(DEFINED IN_SOURCE_BUILD)
2
+ add_llvm_tool(saber saber.cpp)
3
+ else()
4
+ add_executable(saber saber.cpp)
5
+
6
+ target_link_libraries(saber SvfLLVM ${llvm_libs})
7
+
8
+ set_target_properties(saber PROPERTIES RUNTIME_OUTPUT_DIRECTORY
9
+ ${CMAKE_BINARY_DIR}/bin)
10
+ endif()
File without changes
@@ -0,0 +1,13 @@
1
+ set(THREADS_PREFER_PTHREAD_FLAG ON)
2
+ find_package(Threads REQUIRED)
3
+
4
+ if(DEFINED IN_SOURCE_BUILD)
5
+ add_llvm_tool(wpa wpa.cpp)
6
+ else()
7
+ add_executable(wpa wpa.cpp)
8
+
9
+ target_link_libraries(wpa SvfLLVM ${llvm_libs} Threads::Threads)
10
+
11
+ set_target_properties(wpa PROPERTIES RUNTIME_OUTPUT_DIRECTORY
12
+ ${CMAKE_BINARY_DIR}/bin)
13
+ endif()
File without changes
@@ -1,23 +0,0 @@
1
- if(DEFINED IN_SOURCE_BUILD)
2
- set(LLVM_LINK_COMPONENTS
3
- BitWriter
4
- Core
5
- IPO
6
- IrReader
7
- InstCombine
8
- Instrumentation
9
- Target
10
- Linker
11
- Analysis
12
- ScalarOpts
13
- Support
14
- SvfLLVM)
15
- add_llvm_tool(cfl cfl.cpp)
16
- else()
17
- add_executable(cfl cfl.cpp)
18
-
19
- target_link_libraries(cfl SvfLLVM ${llvm_libs})
20
-
21
- set_target_properties(cfl PROPERTIES RUNTIME_OUTPUT_DIRECTORY
22
- ${CMAKE_BINARY_DIR}/bin)
23
- endif()
@@ -1,7 +0,0 @@
1
- # include_directories(svf-llvm/include)
2
- add_subdirectory(SABER)
3
- add_subdirectory(WPA)
4
- add_subdirectory(Example)
5
- add_subdirectory(DDA)
6
- add_subdirectory(MTA)
7
- add_subdirectory(CFL)
@@ -1,23 +0,0 @@
1
- if(DEFINED IN_SOURCE_BUILD)
2
- set(LLVM_LINK_COMPONENTS
3
- BitWriter
4
- Core
5
- IPO
6
- IrReader
7
- InstCombine
8
- Instrumentation
9
- Target
10
- Linker
11
- Analysis
12
- ScalarOpts
13
- Support
14
- SvfLLVM)
15
- add_llvm_tool(dvf dda.cpp)
16
- else()
17
- add_executable(dvf dda.cpp)
18
-
19
- target_link_libraries(dvf SvfLLVM ${llvm_libs})
20
-
21
- set_target_properties(dvf PROPERTIES RUNTIME_OUTPUT_DIRECTORY
22
- ${CMAKE_BINARY_DIR}/bin)
23
- endif()
@@ -1,23 +0,0 @@
1
- if(DEFINED IN_SOURCE_BUILD)
2
- set(LLVM_LINK_COMPONENTS
3
- BitWriter
4
- Core
5
- IPO
6
- IrReader
7
- InstCombine
8
- Instrumentation
9
- Target
10
- Linker
11
- Analysis
12
- ScalarOpts
13
- Support
14
- SvfLLVM)
15
- add_llvm_tool(svf-ex svf-ex.cpp)
16
- else()
17
- add_executable(svf-ex svf-ex.cpp)
18
-
19
- target_link_libraries(svf-ex SvfLLVM ${llvm_libs})
20
-
21
- set_target_properties(svf-ex PROPERTIES RUNTIME_OUTPUT_DIRECTORY
22
- ${CMAKE_BINARY_DIR}/bin)
23
- endif()
@@ -1,25 +0,0 @@
1
- if(DEFINED IN_SOURCE_BUILD)
2
- set(LLVM_LINK_COMPONENTS
3
- BitWriter
4
- Core
5
- IPO
6
- IrReader
7
- InstCombine
8
- Instrumentation
9
- Target
10
- Linker
11
- Analysis
12
- ScalarOpts
13
- Support
14
- SvfLLVM
15
- Cudd)
16
- add_llvm_tool(mta mta.cpp)
17
- else()
18
- add_executable(mta mta.cpp LockResultValidator.cpp MTAResultValidator.cpp
19
- MTAAnnotator.cpp)
20
-
21
- target_link_libraries(mta SvfLLVM ${llvm_libs})
22
-
23
- set_target_properties(mta PROPERTIES RUNTIME_OUTPUT_DIRECTORY
24
- ${CMAKE_BINARY_DIR}/bin)
25
- endif()
@@ -1,23 +0,0 @@
1
- if(DEFINED IN_SOURCE_BUILD)
2
- set(LLVM_LINK_COMPONENTS
3
- BitWriter
4
- Core
5
- IPO
6
- IrReader
7
- InstCombine
8
- Instrumentation
9
- Target
10
- Linker
11
- Analysis
12
- ScalarOpts
13
- Support
14
- SvfLLVM)
15
- add_llvm_tool(saber saber.cpp)
16
- else()
17
- add_executable(saber saber.cpp)
18
-
19
- target_link_libraries(saber SvfLLVM ${llvm_libs})
20
-
21
- set_target_properties(saber PROPERTIES RUNTIME_OUTPUT_DIRECTORY
22
- ${CMAKE_BINARY_DIR}/bin)
23
- endif()
@@ -1,26 +0,0 @@
1
- set(THREADS_PREFER_PTHREAD_FLAG ON)
2
- find_package(Threads REQUIRED)
3
-
4
- if(DEFINED IN_SOURCE_BUILD)
5
- set(LLVM_LINK_COMPONENTS
6
- BitWriter
7
- Core
8
- IPO
9
- IrReader
10
- InstCombine
11
- Instrumentation
12
- Target
13
- Linker
14
- Analysis
15
- ScalarOpts
16
- Support
17
- SvfLLVM)
18
- add_llvm_tool(wpa wpa.cpp)
19
- else()
20
- add_executable(wpa wpa.cpp)
21
-
22
- target_link_libraries(wpa SvfLLVM ${llvm_libs} Threads::Threads)
23
-
24
- set_target_properties(wpa PROPERTIES RUNTIME_OUTPUT_DIRECTORY
25
- ${CMAKE_BINARY_DIR}/bin)
26
- endif()