summaryrefslogtreecommitdiffhomepage
path: root/target/clang-asan.rb
blob: e693332c2979a611ff03f84e1eb1335e6fb91a6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
MRuby::Build.new do |conf|
  toolchain :clang
  # include the GEM box
  conf.gembox 'default'

  # C compiler settings
  conf.cc do |cc|
    cc.flags << "-fsanitize=address,undefined"
    cc.include_paths = ["#{root}/include"]
  end

  # Linker settings
  conf.linker do |linker|
    linker.flags << "-fsanitize=address,undefined"
  end

  # Turn on `enable_debug` for better debugging
  enable_debug
  conf.enable_bintest
  conf.enable_test
end