Skip to content

Commit

Permalink
Support x64 build
Browse files Browse the repository at this point in the history
  • Loading branch information
JSUYA committed Jun 24, 2024
1 parent 0199253 commit f918ffa
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 8 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

strategy:
matrix:
arch: [arm, arm64, x86]
arch: [arm, arm64, x86, x64]
mode: [debug, release, profile]
include:
- arch: arm
Expand All @@ -22,11 +22,17 @@ jobs:
triple: aarch64-linux-gnu
- arch: x86
triple: i686-linux-gnu
- arch: x64
triple: x86_64-linux-gnu
exclude:
- arch: x86
mode: release
- arch: x86
mode: profile
- arch: x64
mode: release
- arch: x64
mode: profile

steps:
- uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions ci/tizen/build_llvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,5 @@ for name in ar readelf nm strip; do
ln -sf llvm-$name arm-linux-gnueabi-$name
ln -sf llvm-$name aarch64-linux-gnu-$name
ln -sf llvm-$name i686-linux-gnu-$name
ln -sf llvm-$name x86_64-linux-gnu-$name
done
23 changes: 16 additions & 7 deletions ci/tizen/generate_sysroot.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,24 @@
def generate_sysroot(sysroot: Path, api_version: float, arch: str, quiet=False):
if arch == 'arm':
tizen_arch = 'armv7l'
target = 'standard'
elif arch == 'arm64':
tizen_arch = 'aarch64'
target = 'standard'
elif arch == 'x86':
tizen_arch = 'i686'
target = 'emulator'
elif arch == 'x64':
tizen_arch = 'x86_64'
target = 'emulator'
else:
sys.exit('Unknown arch: ' + arch)

base_repo = 'http://download.tizen.org/snapshots/TIZEN/Tizen-{}/Tizen-{}-Base/latest/repos/standard/packages'.format(
api_version, api_version
)
unified_repo = 'http://download.tizen.org/snapshots/TIZEN/Tizen-{}/Tizen-{}-Unified/latest/repos/standard/packages'.format(
api_version, api_version
unified_repo = 'http://download.tizen.org/snapshots/TIZEN/Tizen-{}/Tizen-{}-Unified/latest/repos/{}/packages'.format(
api_version, api_version, target
)

# Retrieve html documents.
Expand Down Expand Up @@ -88,14 +94,17 @@ def generate_sysroot(sysroot: Path, api_version: float, arch: str, quiet=False):

# Create symbolic links.
asm = sysroot / 'usr' / 'include' / 'asm'
if not asm.exists():
os.symlink('asm-' + arch, asm)
if (arch == 'x64'):
os.symlink('asm-generic', asm)
else:
if not asm.exists():
os.symlink('asm-' + arch, asm)
pkgconfig = sysroot / 'usr' / 'lib' / 'pkgconfig'
if arch == 'arm64' and not pkgconfig.exists():
if (arch == 'arm64' or arch == 'x64') and not pkgconfig.exists():
os.symlink('../lib64/pkgconfig', pkgconfig)

# Copy objects required by the linker, such as crtbeginS.o and libgcc.a.
if arch == 'arm64':
if arch == 'arm64' or arch == 'x64':
libpath = sysroot / 'usr' / 'lib64'
else:
libpath = sysroot / 'usr' / 'lib'
Expand Down Expand Up @@ -135,7 +144,7 @@ def main():
outpath = Path(__file__).parent / 'sysroot'
outpath.mkdir(exist_ok=True)

for arch in ['arm', 'arm64', 'x86']:
for arch in ['arm', 'arm64', 'x86', 'x64']:
sysroot = outpath / arch
if args.force and sysroot.is_dir():
shutil.rmtree(sysroot)
Expand Down

0 comments on commit f918ffa

Please sign in to comment.