aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/configs/sonar-project.properties2
-rwxr-xr-xsrc/scripts/ci_build.py7
2 files changed, 8 insertions, 1 deletions
diff --git a/src/configs/sonar-project.properties b/src/configs/sonar-project.properties
index 574c19051..38c214642 100644
--- a/src/configs/sonar-project.properties
+++ b/src/configs/sonar-project.properties
@@ -3,6 +3,8 @@ sonar.host.url=https://sonarcloud.io
sonar.organization=randombit-github
sonar.projectKey=botan
+sonar.cfamily.threads=3
+
sonar.projectName=Botan
sonar.sources=src
sonar.language=cpp
diff --git a/src/scripts/ci_build.py b/src/scripts/ci_build.py
index 0c288a540..4896d4e4f 100755
--- a/src/scripts/ci_build.py
+++ b/src/scripts/ci_build.py
@@ -121,8 +121,13 @@ def determine_flags(target, target_os, target_cpu, target_cc, cc_bin, ccache, ro
if target_os != 'linux' or target_cc != 'clang':
raise Exception('Only Linux/clang supported in Sonar target currently')
+ # Use of -Os here is a little odd, but the issue is that the build time
+ # is quite long (because ccache from Xenial doesn't work right with
+ # these profiling flags) but we can't use --no-optimizations as that
+ # will make running the tests too slow.
flags += ['--cc-abi-flags=-fprofile-instr-generate -fcoverage-mapping',
- '--disable-shared']
+ '--disable-shared',
+ '--optimize-for-size']
make_prefix = [os.path.join(root_dir, 'build-wrapper-linux-x86/build-wrapper-linux-x86-64'),
'--out-dir', 'bw-outputs']