Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions netdata.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,7 @@ Obsoletes: %{name}-data

# Build dependencies
#
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: clang
BuildRequires: make
BuildRequires: git-core
BuildRequires: cmake
Expand Down Expand Up @@ -375,6 +374,9 @@ advanced correlations and fast root cause analysis, native horizontal scalabilit
%setup -q -n "%{name}-%{version}"

%build
%define __cc clang
%define __cxx clang++
export CFLAGS="%{optflags} -Wno-unused-command-line-argument -Wno-unknown-warning-option"
# Conf step
%cmake -G Ninja \
-DCMAKE_INSTALL_PREFIX=/ \
Expand Down
3 changes: 3 additions & 0 deletions packaging/build-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ SOURCE_DIR="$(dirname "$(dirname "${SCRIPT_SOURCE}")")"

CMAKE_ARGS="-S ${SOURCE_DIR} -B ${BUILD_DIR}"

export CC=clang
export CXX=clang++

add_cmake_option() {
CMAKE_ARGS="${CMAKE_ARGS} -D${1}=${2}"
}
Expand Down
7 changes: 6 additions & 1 deletion packaging/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@ RUN chmod +x netdata-installer.sh && \
cp -rp /deps/* /usr/local/ && \
BUILD_ARCH="${BUILD_ARCH:-"$(uname -m)"}" && \
/bin/echo -e "INSTALL_TYPE='oci'\nPREBUILT_ARCH='${BUILD_ARCH}'" > ./system/.install-type && \
CFLAGS="$(packaging/docker/gen-cflags.sh)" LDFLAGS="-Wl,--gc-sections" ./netdata-installer.sh --dont-wait --dont-start-it \
CC=clang CXX=clang++ \
CFLAGS="$(packaging/docker/gen-cflags.sh)" \
LDFLAGS="-Wl,--gc-sections" \
./netdata-installer.sh \
--dont-wait \
--dont-start-it \
--use-system-protobuf \
--disable-ebpf \
--enable-plugin-otel \
Expand Down
Loading