Fixup 360 support
This commit is contained in:
parent
6b8a34c9ba
commit
14abe1a407
27
premake5.lua
27
premake5.lua
|
@ -28,9 +28,11 @@ defines({
|
||||||
})
|
})
|
||||||
|
|
||||||
-- TODO(DrChat): Find a way to disable this on other architectures.
|
-- TODO(DrChat): Find a way to disable this on other architectures.
|
||||||
|
if ARCH ~= "ppc64" then
|
||||||
filter("architecture:x86_64")
|
filter("architecture:x86_64")
|
||||||
vectorextensions("AVX")
|
vectorextensions("AVX")
|
||||||
filter({})
|
filter({})
|
||||||
|
end
|
||||||
|
|
||||||
characterset("Unicode")
|
characterset("Unicode")
|
||||||
flags({
|
flags({
|
||||||
|
@ -95,13 +97,6 @@ filter("platforms:Linux")
|
||||||
"dl",
|
"dl",
|
||||||
"lz4",
|
"lz4",
|
||||||
"rt",
|
"rt",
|
||||||
"X11",
|
|
||||||
"xcb",
|
|
||||||
"X11-xcb",
|
|
||||||
"GL",
|
|
||||||
"vulkan",
|
|
||||||
"c++",
|
|
||||||
"c++abi"
|
|
||||||
})
|
})
|
||||||
linkoptions({
|
linkoptions({
|
||||||
"`pkg-config --libs gtk+-3.0`",
|
"`pkg-config --libs gtk+-3.0`",
|
||||||
|
@ -110,19 +105,31 @@ filter("platforms:Linux")
|
||||||
filter({"platforms:Linux", "kind:*App"})
|
filter({"platforms:Linux", "kind:*App"})
|
||||||
linkgroups("On")
|
linkgroups("On")
|
||||||
|
|
||||||
filter({"platforms:Linux", "language:C++", "toolset:gcc"})
|
filter({"platforms:Linux", "toolset:gcc"})
|
||||||
buildoptions({
|
buildoptions({
|
||||||
"--std=c++11",
|
"-std=c++14",
|
||||||
})
|
})
|
||||||
links({
|
links({
|
||||||
})
|
})
|
||||||
|
if ARCH == "ppc64" then
|
||||||
|
buildoptions({
|
||||||
|
"-m32",
|
||||||
|
"-mpowerpc64"
|
||||||
|
})
|
||||||
|
linkoptions({
|
||||||
|
"-m32",
|
||||||
|
"-mpowerpc64"
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
filter({"platforms:Linux", "language:C++", "toolset:clang"})
|
filter({"platforms:Linux", "toolset:clang"})
|
||||||
buildoptions({
|
buildoptions({
|
||||||
"-std=c++14",
|
"-std=c++14",
|
||||||
"-stdlib=libstdc++",
|
"-stdlib=libstdc++",
|
||||||
})
|
})
|
||||||
links({
|
links({
|
||||||
|
"c++",
|
||||||
|
"c++abi"
|
||||||
})
|
})
|
||||||
disablewarnings({
|
disablewarnings({
|
||||||
"deprecated-register"
|
"deprecated-register"
|
||||||
|
|
|
@ -60,6 +60,15 @@ project("xenia-app")
|
||||||
project_root,
|
project_root,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
filter("platforms:Linux")
|
||||||
|
links({
|
||||||
|
"X11",
|
||||||
|
"xcb",
|
||||||
|
"X11-xcb",
|
||||||
|
"GL",
|
||||||
|
"vulkan",
|
||||||
|
})
|
||||||
|
|
||||||
filter("platforms:Windows")
|
filter("platforms:Windows")
|
||||||
links({
|
links({
|
||||||
"xenia-apu-xaudio2",
|
"xenia-apu-xaudio2",
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
// NOTE: if you're including this file it means you are explicitly depending
|
// NOTE: if you're including this file it means you are explicitly depending
|
||||||
// on Linux headers. Including this file outside of linux platform specific
|
// on Linux headers. Including this file outside of linux platform specific
|
||||||
// source code will break portability
|
// source code will break portability
|
||||||
|
#include <cstddef>
|
||||||
|
|
||||||
#include "xenia/base/platform.h"
|
#include "xenia/base/platform.h"
|
||||||
|
|
||||||
|
|
|
@ -189,7 +189,7 @@ class TestRunner {
|
||||||
|
|
||||||
~TestRunner() {
|
~TestRunner() {
|
||||||
memory::DeallocFixed(memory_, memory_size_,
|
memory::DeallocFixed(memory_, memory_size_,
|
||||||
memory::DeallocationType::kDecommitRelease);
|
memory::DeallocationType::kRelease);
|
||||||
|
|
||||||
memory::AlignedFree(context_);
|
memory::AlignedFree(context_);
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,6 +68,15 @@ project("xenia-gpu-gl4-trace-viewer")
|
||||||
"../../base/main_"..platform_suffix..".cc",
|
"../../base/main_"..platform_suffix..".cc",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
filter("platforms:Linux")
|
||||||
|
links({
|
||||||
|
"X11",
|
||||||
|
"xcb",
|
||||||
|
"X11-xcb",
|
||||||
|
"GL",
|
||||||
|
"vulkan",
|
||||||
|
})
|
||||||
|
|
||||||
filter("platforms:Windows")
|
filter("platforms:Windows")
|
||||||
links({
|
links({
|
||||||
"xenia-apu-xaudio2",
|
"xenia-apu-xaudio2",
|
||||||
|
|
|
@ -71,6 +71,15 @@ project("xenia-gpu-vulkan-trace-viewer")
|
||||||
"../../base/main_"..platform_suffix..".cc",
|
"../../base/main_"..platform_suffix..".cc",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
filter("platforms:Linux")
|
||||||
|
links({
|
||||||
|
"X11",
|
||||||
|
"xcb",
|
||||||
|
"X11-xcb",
|
||||||
|
"GL",
|
||||||
|
"vulkan",
|
||||||
|
})
|
||||||
|
|
||||||
filter("platforms:Windows")
|
filter("platforms:Windows")
|
||||||
links({
|
links({
|
||||||
"xenia-apu-xaudio2",
|
"xenia-apu-xaudio2",
|
||||||
|
@ -131,6 +140,15 @@ project("xenia-gpu-vulkan-trace-dump")
|
||||||
"../../base/main_"..platform_suffix..".cc",
|
"../../base/main_"..platform_suffix..".cc",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
filter("platforms:Linux")
|
||||||
|
links({
|
||||||
|
"X11",
|
||||||
|
"xcb",
|
||||||
|
"X11-xcb",
|
||||||
|
"GL",
|
||||||
|
"vulkan",
|
||||||
|
})
|
||||||
|
|
||||||
filter("platforms:Windows")
|
filter("platforms:Windows")
|
||||||
-- Only create the .user file if it doesn't already exist.
|
-- Only create the .user file if it doesn't already exist.
|
||||||
local user_file = project_root.."/build/xenia-gpu-vulkan-trace-dump.vcxproj.user"
|
local user_file = project_root.."/build/xenia-gpu-vulkan-trace-dump.vcxproj.user"
|
||||||
|
|
22
xenia-build
22
xenia-build
|
@ -310,7 +310,7 @@ def get_clang_format_binary():
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
def run_premake(target_os, action):
|
def run_premake(target_os, action, cc=None):
|
||||||
"""Runs premake on the main project with the given format.
|
"""Runs premake on the main project with the given format.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -322,7 +322,7 @@ def run_premake(target_os, action):
|
||||||
os.path.join('tools', 'build', 'premake'),
|
os.path.join('tools', 'build', 'premake'),
|
||||||
'--file=premake5.lua',
|
'--file=premake5.lua',
|
||||||
'--os=%s' % target_os,
|
'--os=%s' % target_os,
|
||||||
'--cc=clang',
|
'--cc=%s' % ('clang' if not cc else cc),
|
||||||
'--test-suite-mode=combined',
|
'--test-suite-mode=combined',
|
||||||
'--verbose',
|
'--verbose',
|
||||||
action,
|
action,
|
||||||
|
@ -344,7 +344,7 @@ def run_premake_clean():
|
||||||
return run_premake('linux', 'clean')
|
return run_premake('linux', 'clean')
|
||||||
|
|
||||||
|
|
||||||
def run_platform_premake():
|
def run_platform_premake(cc=None):
|
||||||
"""Runs all gyp configurations.
|
"""Runs all gyp configurations.
|
||||||
"""
|
"""
|
||||||
if sys.platform == 'darwin':
|
if sys.platform == 'darwin':
|
||||||
|
@ -356,7 +356,7 @@ def run_platform_premake():
|
||||||
|
|
||||||
return run_premake('windows', 'vs' + vs_version)
|
return run_premake('windows', 'vs' + vs_version)
|
||||||
else:
|
else:
|
||||||
ret = run_premake('linux', 'gmake')
|
ret = run_premake('linux', 'gmake', cc)
|
||||||
ret = ret != 0 and run_premake('linux', 'codelite') or ret
|
ret = ret != 0 and run_premake('linux', 'codelite') or ret
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
@ -546,12 +546,14 @@ class PremakeCommand(Command):
|
||||||
name='premake',
|
name='premake',
|
||||||
help_short='Runs premake to update all projects.',
|
help_short='Runs premake to update all projects.',
|
||||||
*args, **kwargs)
|
*args, **kwargs)
|
||||||
|
self.parser.add_argument(
|
||||||
|
'--cc', default='clang', help='Compiler toolchain passed to premake')
|
||||||
|
|
||||||
def execute(self, args, pass_args, cwd):
|
def execute(self, args, pass_args, cwd):
|
||||||
# Update premake. If no binary found, it will be built from source.
|
# Update premake. If no binary found, it will be built from source.
|
||||||
print('Running premake...')
|
print('Running premake...')
|
||||||
print('')
|
print('')
|
||||||
if run_platform_premake() == 0:
|
if run_platform_premake(args['cc']) == 0:
|
||||||
print('Success!')
|
print('Success!')
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
|
@ -564,6 +566,8 @@ class BaseBuildCommand(Command):
|
||||||
super(BaseBuildCommand, self).__init__(
|
super(BaseBuildCommand, self).__init__(
|
||||||
subparsers,
|
subparsers,
|
||||||
*args, **kwargs)
|
*args, **kwargs)
|
||||||
|
self.parser.add_argument(
|
||||||
|
'--cc', default='clang', help='Compiler toolchain passed to premake')
|
||||||
self.parser.add_argument(
|
self.parser.add_argument(
|
||||||
'--config', choices=['checked', 'debug', 'release'], default='debug',
|
'--config', choices=['checked', 'debug', 'release'], default='debug',
|
||||||
type=str.lower, help='Chooses the build configuration.')
|
type=str.lower, help='Chooses the build configuration.')
|
||||||
|
@ -582,7 +586,7 @@ class BaseBuildCommand(Command):
|
||||||
def execute(self, args, pass_args, cwd):
|
def execute(self, args, pass_args, cwd):
|
||||||
if not args['no_premake']:
|
if not args['no_premake']:
|
||||||
print('- running premake...')
|
print('- running premake...')
|
||||||
run_platform_premake()
|
run_platform_premake(args['cc'])
|
||||||
print('')
|
print('')
|
||||||
|
|
||||||
threads = args['j']
|
threads = args['j']
|
||||||
|
@ -613,12 +617,6 @@ class BaseBuildCommand(Command):
|
||||||
print('ERROR: don\'t know how to build on this platform.')
|
print('ERROR: don\'t know how to build on this platform.')
|
||||||
result = 1
|
result = 1
|
||||||
else:
|
else:
|
||||||
# TODO(benvanik): allow gcc?
|
|
||||||
if 'CXX' not in os.environ:
|
|
||||||
os.environ['CXX'] = 'clang++-3.8'
|
|
||||||
if 'CC' not in os.environ:
|
|
||||||
os.environ['CC'] = 'clang-3.8'
|
|
||||||
|
|
||||||
result = subprocess.call([
|
result = subprocess.call([
|
||||||
'make',
|
'make',
|
||||||
'-j' if threads is 0 else '-j%d' % threads,
|
'-j' if threads is 0 else '-j%d' % threads,
|
||||||
|
|
Loading…
Reference in New Issue