From 6a8ec2bd4d9b1c2c70408d529a50c8c1c3d041ef Mon Sep 17 00:00:00 2001 From: Cristian Cadar Date: Tue, 18 Dec 2018 15:03:43 +0000 Subject: Added linking option category --- tools/klee/main.cpp | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) (limited to 'tools') diff --git a/tools/klee/main.cpp b/tools/klee/main.cpp index dd524f58..af97b759 100644 --- a/tools/klee/main.cpp +++ b/tools/klee/main.cpp @@ -141,6 +141,12 @@ namespace { cl::desc("Parse environment from given file (in \"env\" format)"), cl::cat(StartCat)); + + /*** Linking options ***/ + + cl::OptionCategory LinkCat("Linking options", + "These options control the libraries being linked."); + enum class LibcType { FreeStandingLibc, KleeLibc, UcLibc }; cl::opt @@ -156,8 +162,20 @@ namespace { clEnumValN(LibcType::UcLibc, "uclibc", "Link in uclibc (adapted for KLEE)") KLEE_LLVM_CL_VAL_END), - cl::init(LibcType::FreeStandingLibc)); + cl::init(LibcType::FreeStandingLibc), + cl::cat(LinkCat)); + cl::list + LinkLibraries("link-llvm-lib", + cl::desc("Link the given library before execution. Can be used multiple times."), + cl::value_desc("library file"), + cl::cat(LinkCat)); + + cl::opt + WithPOSIXRuntime("posix-runtime", + cl::desc("Link with POSIX runtime. Options that can be passed as arguments to the programs are: --sym-arg --sym-args + file model options"), + cl::init(false), + cl::cat(LinkCat)); cl::opt @@ -172,11 +190,6 @@ namespace { OptExitOnError("exit-on-error", cl::desc("Exit if errors occur")); - cl::opt - WithPOSIXRuntime("posix-runtime", - cl::desc("Link with POSIX runtime. Options that can be passed as arguments to the programs are: --sym-arg --sym-args + file model options"), - cl::init(false)); - cl::opt OptimizeModule("optimize", cl::desc("Optimize before execution"), @@ -223,11 +236,6 @@ namespace { cl::list SeedOutDir("seed-out-dir"); - cl::list - LinkLibraries("link-llvm-lib", - cl::desc("Link the given libraries before execution"), - cl::value_desc("library file")); - cl::opt MakeConcreteSymbolic("make-concrete-symbolic", cl::desc("Probabilistic rate at which to make concrete reads symbolic, " -- cgit 1.4.1