forked from WPMGPRoSToTeMa/SafeNameAndChat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
41 lines (41 loc) · 1.81 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
dist: trusty
sudo: required
language: cpp
os: linux
compiler: gcc
addons:
apt:
sources: ubuntu-toolchain-r-test
packages:
- linux-libc-dev:i386
- g++-8
- g++-8-multilib
- cmake
- freebsd-buildutils
before_install: eval "CC=gcc-8 && CXX=g++-8"
script:
# Why do we need -fno-gnu-unique?
# These params disable "global unique objects" generated for currently compiled code
#
# -fuse-ld=gold -Wl,--no-gnu-unique
# These params disable "global unique objects" for already compiled object files, so there will be no UNIQUE in result binary
# You need to use these params if you're exporting symbols from object files not compiled with -fno-gnu-unique
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60348#c5
# BTW -fuse-ld=gold always (sure?) produce binary with SVR4 brand, but we can change it by brandelf anyway
# Also idk what also the gold linker affects in result binary, there is about 5KB diff
#
# TODO: -flto & its issues with hiding symbols
# If static library is compiled with -flto, its exported symbols may be exported even if you have version script file
# There is a command for linker fixes that issue, but I forgot it
#
# Also looks like I'm having some issues with -ldl importing, hmm... (IDA doesn't display required glibc version for imported functions)
- ${CXX} Main.cpp -m32 -O3 -shared -std=c++14 -s -static-libgcc -static-libstdc++ -fvisibility=hidden -fpermissive -Ihlsdk/common -Ihlsdk/dlls -Ihlsdk/engine -Ihlsdk/pm_shared -Imetamod -ldl -o SafeNameAndChat.so -fdata-sections -ffunction-sections -Wl,--version-script=version_script.lds -Wl,--gc-sections -fno-gnu-unique
- brandelf SafeNameAndChat.so -t SVR4
deploy:
provider: releases
file: SafeNameAndChat.so
skip_cleanup: true
overwrite: true
api_key: '$GITHUB_API_KEY'
on:
tags: true