Skip to content

Commit

Permalink
Support x86 build
Browse files Browse the repository at this point in the history
  • Loading branch information
JSUYA committed Jun 13, 2024
1 parent 84ee23c commit af76184
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 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
8 changes: 5 additions & 3 deletions ci/tizen/generate_sysroot.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ def generate_sysroot(sysroot: Path, api_version: float, arch: str, quiet=False):
tizen_arch = 'aarch64'
elif arch == 'x86':
tizen_arch = 'i686'
elif arch == 'x64':
tizen_arch = 'x86_64'
else:
sys.exit('Unknown arch: ' + arch)

Expand Down Expand Up @@ -90,11 +92,11 @@ def generate_sysroot(sysroot: Path, api_version: float, arch: str, quiet=False):
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 @@ -134,7 +136,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 af76184

Please sign in to comment.