From e4b6f2227650dd443ae553c3afb39a5d072e1eec Mon Sep 17 00:00:00 2001 From: Laszlo Nagy Date: Sun, 21 Aug 2016 22:25:58 +1000 Subject: [PATCH] fix wrapper logging was missing --- libscanbuild/__init__.py | 2 +- libscanbuild/analyze.py | 4 ++-- libscanbuild/intercept.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libscanbuild/__init__.py b/libscanbuild/__init__.py index 9a73cef..fccfa5c 100644 --- a/libscanbuild/__init__.py +++ b/libscanbuild/__init__.py @@ -130,7 +130,7 @@ def wrapper(): """ It executes the compilation and calls the wrapped method. """ # set logging level when neeeded - verbose = bool(os.getenv(WRAPPER_VERBOSE, '0')) + verbose = int(os.getenv(WRAPPER_VERBOSE, '0')) reconfigure_logging(verbose) # find out what is the real compiler is_cxx = os.path.basename(sys.argv[0]).endswith('++') diff --git a/libscanbuild/analyze.py b/libscanbuild/analyze.py index 50c54e7..ecfb8dc 100644 --- a/libscanbuild/analyze.py +++ b/libscanbuild/analyze.py @@ -127,7 +127,7 @@ def setup_environment(args, bin_dir, destination): cxx_wrapper=os.path.join(bin_dir, COMPILER_WRAPPER_CXX), c_compiler=args.cc, cxx_compiler=args.cxx, - verbose=args.verbose > 2)) + verbose=args.verbose)) # request analyzer run when destination directory is not None environment.update({ 'ANALYZE_BUILD_CLANG': args.clang, @@ -140,8 +140,8 @@ def setup_environment(args, bin_dir, destination): return environment -@wrapper_entry_point @command_entry_point +@wrapper_entry_point def analyze_build_wrapper(**kwargs): """ Entry point for `analyze-cc` and `analyze-c++` compiler wrappers. """ diff --git a/libscanbuild/intercept.py b/libscanbuild/intercept.py index 0f2122e..958076c 100644 --- a/libscanbuild/intercept.py +++ b/libscanbuild/intercept.py @@ -131,7 +131,7 @@ def setup_environment(args, destination, bin_dir): cxx_wrapper=os.path.join(bin_dir, COMPILER_WRAPPER_CXX), c_compiler=args.cc, cxx_compiler=args.cxx, - verbose=args.verbose > 2)) + verbose=args.verbose)) elif sys.platform == 'darwin': environment.update({ 'DYLD_INSERT_LIBRARIES': intercept_library, @@ -143,8 +143,8 @@ def setup_environment(args, destination, bin_dir): return environment -@wrapper_entry_point @command_entry_point +@wrapper_entry_point def intercept_build_wrapper(**kwargs): """ Entry point for `intercept-cc` and `intercept-c++` compiler wrappers.