Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a separate build directory for each port #23961

Merged
merged 3 commits into from
Mar 21, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Use a separate build directory for each port
This allows building them simultaneously with Ninja.
Split out from #23924
  • Loading branch information
dschuff committed Mar 20, 2025
commit 03c1930d838a176e747ae8b14d7adbb9c08b82b7
5 changes: 4 additions & 1 deletion tools/ports/__init__.py
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@
import logging
import hashlib
import os
from pathlib import Path
import shutil
import glob
import importlib.util
@@ -176,7 +177,9 @@ def install_headers(src_dir, pattern='*.h', target=None):

@staticmethod
def build_port(src_dir, output_path, port_name, includes=[], flags=[], cxxflags=[], exclude_files=[], exclude_dirs=[], srcs=[]): # noqa
build_dir = os.path.join(Ports.get_build_dir(), port_name)
mangled_name = str(Path(output_path).relative_to(cache.get_sysroot(True))).replace(os.sep, '_').replace('.', '_')
build_dir = os.path.join(Ports.get_build_dir(), mangled_name)
logger.debug(f'build_port: {port_name} {output_path} in {build_dir}')
if srcs:
srcs = [os.path.join(src_dir, s) for s in srcs]
else: