Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-18440

Can't pass -fsanitize-coverage to scons using CCFLAGS

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • Needs Further Definition
    • Affects Version/s: 3.1.2
    • Component/s: Build
    • None
    • ALL

      using clang v3.6.0

      scons -j12 --mute CC=/usr/local/bin/clang CXX=/usr/local/bin/clang++ CCFLAGS="-fsanitize-coverage=2" --opt=off --allocator=system --sanitize=address --variant-dir=asan mongod unittests
      scons: Reading SConscript files ...
      scons version: 2.3.4
      python version: 2 7 4 'final' 0
      Checking whether the C++ compiler works... yes
      Checking whether the C compiler works... yes
      Checking if C++ compiler "/usr/local/bin/clang++" is GCC... no
      Checking if C++ compiler "/usr/local/bin/clang++" is clang... yes
      Checking if C compiler "/usr/local/bin/clang" is clang... yes
      Detected a x86_64 processor
      Checking if target OS linux is supported by the toolchain yes
      Checking if C compiler is clang 3.4 (or Apple XCode 5.1.1) or newer...no
      Checking if C++ compiler is clang 3.4 (or Apple XCode 5.1.1) or newer...no
      ERROR: Refusing to build with compiler that does not meet requirements
      See /mnt/hdd/mongo-copy/build/scons/config.log for details
      

      Attaching config.log.

      Note: Hacking SConstruct to pass -fsanitize-coverage=2 manually appears to work.

            Assignee:
            alex.neben@mongodb.com Alex Neben
            Reporter:
            randolph@mongodb.com Randolph Tan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: