Results 1 to 2 of 2

Thread: How to force searching LLVM headers, instead of GNU headers?

  1. #1
    Join Date
    Jul 2006
    Location
    Surrey, BC, Canada
    Beans
    255
    Distro
    Ubuntu

    How to force searching LLVM headers, instead of GNU headers?

    Hi, all:

    I've been using Ubuntu 22.04.

    I set up CMake for LLVM compilation, as follows:

    Code:
    CMAKE_ADDR2LINE                  /usr/bin/llvm-addr2line
     CMAKE_AR                         /usr/bin/llvm-ar
     CMAKE_ASM_COMPILER               /usr/bin/clang
     CMAKE_ASM_COMPILER_AR            /usr/lib/llvm-14/bin/llvm-ar
     CMAKE_ASM_COMPILER_RANLIB        /usr/lib/llvm-14/bin/llvm-ranlib
    .....
    CMAKE_CXX_COMPILER               /usr/bin/clang++
     CMAKE_CXX_COMPILER_AR            /usr/bin/llvm-ar-14
     CMAKE_CXX_COMPILER_RANLIB        /usr/bin/llvm-ranlib-14
    .....

    But, it looks when I
    Code:
    #include <cmath>
    , in which
    Code:
    #include <math.h>
    , during building, it automatically search for the **GNU header** -
    Code:
    /usr/include/c++/11/math.h
    , rather than **LLVM header** -
    Code:
    /usr/lib/llvm-14/include/c++/v1/math.h
    .

    How can I force to use LLVM's header ONLY?

    Thank you
    Welcome to Vision Open
    http://www.visionopen.com

  2. #2
    Join Date
    Aug 2016
    Location
    Wandering
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: How to force searching LLVM headers, instead of GNU headers?

    Did you ever try daphnediane's suggestion: https://discourse.llvm.org/t/how-to-...-headers/64030
    With realization of one's own potential and self-confidence in one's ability, one can build a better world.
    Dalai Lama>>
    Code Tags | System-info | Forum Guide lines | Arch Linux, Debian Unstable, FreeBSD

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •