forked from irungentoo/toxcore
-
Notifications
You must be signed in to change notification settings - Fork 291
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Use strong typedef instead of struct for
Socket
.
Sparse checks it. This is neater than using a struct, which has some slightly weird syntax at times and reduces the risk of someone adding another struct member.
- Loading branch information
Showing
9 changed files
with
93 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
CFLAGS=-O3 -g -Wno-discarded-qualifiers -Wno-format-truncation -Wno-stringop-truncation -Wno-uninitialized -Wno-unused -Wno-unused-result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh | ||
|
||
set -eux | ||
BUILD=sparse | ||
other/docker/sources/build | ||
docker build -t "toxchat/c-toxcore:$BUILD" -f "other/docker/$BUILD/$BUILD.Dockerfile" . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
FROM toxchat/c-toxcore:sources AS sources | ||
FROM ubuntu:22.04 | ||
|
||
RUN apt-get update && \ | ||
DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends \ | ||
ca-certificates \ | ||
creduce \ | ||
g++ \ | ||
gcc \ | ||
git \ | ||
libc-dev \ | ||
libopus-dev \ | ||
libsodium-dev \ | ||
libsqlite3-dev \ | ||
libssl-dev \ | ||
libvpx-dev \ | ||
llvm-dev \ | ||
make \ | ||
pkg-config \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
WORKDIR /work/smatch | ||
RUN git clone --depth=1 https://repo.or.cz/smatch.git /work/smatch | ||
COPY other/docker/sparse/local.mk /work/smatch/local.mk | ||
RUN make install -j4 PREFIX=/usr/local | ||
|
||
WORKDIR /work/c-toxcore | ||
COPY --from=sources /src/ /work/c-toxcore | ||
#COPY other/make_single_file /work/c-toxcore/other/ | ||
#RUN other/make_single_file auto_tests/tox_new_test.c > crash.c | ||
#RUN sparsec $(pkg-config --cflags --libs libsodium opus vpx) crash.c | ||
|
||
COPY other/docker/sparse/Makefile /work/c-toxcore/ | ||
RUN make -j4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters