xref: /petsc/config/examples/arch-ci-linux-clang-ubsan.py (revision 7b5fd022a6ba26727040df7457b27566b4c6742d)
1*14629c9cSPierre Jolivet#!/usr/bin/env python3
2*14629c9cSPierre Jolivet
3*14629c9cSPierre Jolivetimport os
4*14629c9cSPierre Jolivetpetsc_hash_pkgs=os.path.join(os.getenv('HOME'),'petsc-hash-pkgs')
5*14629c9cSPierre Jolivet
6*14629c9cSPierre Jolivetif __name__ == '__main__':
7*14629c9cSPierre Jolivet  import sys
8*14629c9cSPierre Jolivet  import os
9*14629c9cSPierre Jolivet  sys.path.insert(0, os.path.abspath('config'))
10*14629c9cSPierre Jolivet  import configure
11*14629c9cSPierre Jolivet  configure_options = [
12*14629c9cSPierre Jolivet    '--package-prefix-hash='+petsc_hash_pkgs,
13*14629c9cSPierre Jolivet    '--with-cudac=0',
14*14629c9cSPierre Jolivet    '--with-hipc=0',
15*14629c9cSPierre Jolivet    '--download-mpich',
16*14629c9cSPierre Jolivet    '--with-cc=clang',
17*14629c9cSPierre Jolivet    '--with-cxx=clang++',
18*14629c9cSPierre Jolivet    '--with-fc=0',
19*14629c9cSPierre Jolivet    '--with-debugging=1',
20*14629c9cSPierre Jolivet    'CFLAGS=-fsanitize=address,undefined',
21*14629c9cSPierre Jolivet    'CXXFLAGS=-fsanitize=address,undefined',
22*14629c9cSPierre Jolivet    'LDFLAGS=-lubsan',
23*14629c9cSPierre Jolivet    '--with-strict-petscerrorcode',
24*14629c9cSPierre Jolivet  ]
25*14629c9cSPierre Jolivet  configure.petsc_configure(configure_options)
26