Basic linux build.
This commit is contained in:
parent
daaa2bce7b
commit
ef374801aa
27
.travis.yml
27
.travis.yml
|
@ -12,23 +12,34 @@ os:
|
|||
- linux
|
||||
# - osx
|
||||
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- llvm-toolchain-precise
|
||||
packages:
|
||||
- clang-3.8
|
||||
- clang-format-3.8
|
||||
# TODO(benvanik): re-enable when clang-3.8 is whitelisted.
|
||||
# https://github.com/travis-ci/apt-package-whitelist/issues/474
|
||||
#addons:
|
||||
# apt:
|
||||
# sources:
|
||||
# - llvm-toolchain-precise
|
||||
# packages:
|
||||
# - clang-3.8
|
||||
# - clang-format-3.8
|
||||
|
||||
git:
|
||||
# We handle submodules ourselves in xenia-build setup.
|
||||
submodules: false
|
||||
|
||||
before_install:
|
||||
- sudo add-apt-repository "deb http://llvm.org/apt/precise/ llvm-toolchain-precise main" -y
|
||||
- wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add -
|
||||
- sudo apt-get update -qq
|
||||
|
||||
install:
|
||||
- sudo apt-get install clang-3.8 clang-format-3.8
|
||||
|
||||
before_script:
|
||||
# Dump useful info.
|
||||
- $CXX --version
|
||||
# Prepare environment (pull dependencies, build tools).
|
||||
- travis_retry ./xenia-build setup
|
||||
|
||||
# Run test suites.
|
||||
script:
|
||||
# Run linter.
|
||||
- ./xenia-build lint --all
|
||||
|
|
14
premake5.lua
14
premake5.lua
|
@ -63,12 +63,16 @@ filter("configurations:Release")
|
|||
runtime("Release")
|
||||
linkoptions({"/NODEFAULTLIB:MSVCRTD"})
|
||||
|
||||
filter("platforms:Linux")
|
||||
system("linux")
|
||||
toolset("clang")
|
||||
buildoptions({
|
||||
"-std=c++11",
|
||||
})
|
||||
|
||||
filter("platforms:Windows")
|
||||
system("windows")
|
||||
toolset("msc")
|
||||
-- Ignores complaints about empty obj files:
|
||||
linkoptions({"/ignore:4006", "/ignore:4221"})
|
||||
-- Enable multiprocessor compiles (requires Minimal Rebuild to be disabled).
|
||||
buildoptions({
|
||||
"/MP", -- Multiprocessor compilation.
|
||||
"/wd4100", -- Unreferenced parameters are ok.
|
||||
|
@ -88,6 +92,8 @@ filter("platforms:Windows")
|
|||
"_WIN64=1",
|
||||
"_AMD64=1",
|
||||
})
|
||||
-- Ignores complaints about empty obj files:
|
||||
linkoptions({"/ignore:4006", "/ignore:4221"})
|
||||
links({
|
||||
"ntdll",
|
||||
"wsock32",
|
||||
|
@ -133,7 +139,7 @@ solution("xenia")
|
|||
uuid("931ef4b0-6170-4f7a-aaf2-0fece7632747")
|
||||
startproject("xenia-app")
|
||||
configurations({"Checked", "Debug", "Release"})
|
||||
platforms({"Windows"})
|
||||
platforms({"Windows", "Linux"})
|
||||
architecture("x86_64")
|
||||
|
||||
include("src/xenia")
|
||||
|
|
13
xenia-build
13
xenia-build
|
@ -492,9 +492,18 @@ class BaseBuildCommand(Command):
|
|||
args['config'],
|
||||
] + [('/project ', target) for target in args['target']] +
|
||||
pass_args, throw_on_error=False)
|
||||
else:
|
||||
elif sys.platform == 'darwin':
|
||||
# TODO(benvanik): other platforms.
|
||||
print('ERROR: don\'t know how to build on this platform.')
|
||||
else:
|
||||
# TODO(benvanik): allow gcc?
|
||||
os.environ['CXX'] = 'clang++-3.8'
|
||||
os.environ['CC'] = 'clang-3.8'
|
||||
result = shell_call([
|
||||
'make',
|
||||
'-Cbuild/',
|
||||
'config=%s_linux' % (args['config']),
|
||||
] + pass_args, throw_on_error=False)
|
||||
print('')
|
||||
if result != 0:
|
||||
print('ERROR: build failed with one or more errors.')
|
||||
|
@ -734,7 +743,7 @@ class NukeCommand(Command):
|
|||
print('- git reset to master...')
|
||||
shell_call([
|
||||
'git',
|
||||
'checkout',
|
||||
'reset',
|
||||
'--hard',
|
||||
'master',
|
||||
])
|
||||
|
|
Loading…
Reference in New Issue