Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Port DXC to Linux [umbrella issue] #194

Description

@ehsannas

This is an umbrella issue to track all the work that's needed to be done related to porting DXC to Linux.

  • Make all necessary CMake changes in order to compile the project on Linux.
  • Disable all the SAL Annotations used throughout the code
    • Usages such as: _In_, _Out_, _Field_size_(...), etc.
    • Full list at WinSAL.h
  • Define Windows-specific macros that are used throughout the code
    • Examples: ATLASSERT, STDAPI, UNREFERENCED_PARAMETER, etc.
    • Full list at WinMacros.h
  • Define the Windows-specific types
    • Simple cases such as: BOOLEAN, WORD, BYTE, LPSTR, PCWSTR, HMODULE, HINSTANCE, etc.
    • More complicated cases: LARGE_INTEGER, STATSTG, etc.
    • Defined in WinTypes.h
  • Implement "adapter" classes to fill the void of unknown classes on Linux.
    • CAllocator. Provides Allocate, Free, and Reallocate interfaces using malloc, free, and realloc.
    • Converters for strings (CW2A, CW2AEX, CA2W, CA2WEX) ([linux-port] CA2W and CA2WEX #172)
    • Smart pointer for heap memory (CHeapPtr with methods such as Allocate, Attach, Detach, Free, etc.)
    • CSimpleArray. Provides functionalities similar to std::vector
    • COM related: IUnknown, CComPtrBase, CComPtr, IMalloc
    • Stream related: IStream, ISequentialStream
  • Implement a method to provide QueryInterface and __uuidof(...) functionality.
  • Provide an MSFileSystem impl for Unix.
  • Replace hardcoded usages of DLL filenames (e.g. dxcompiler.dll) with .so equivalents (e.g. libdxcompiler.so)
  • Implement some Windows-specific functions:
    • MultiByteToWideChar
    • WideCharToMultiByte
    • Replace LoadLibrary, FreeLibrary, GetProcAddress (using dlopen, dlclose, dlsym)
    • Replace CheckThreadId with sys::SmartScopedReader in PassRegistry.
  • File I/O and Console I/O -> Must revisit.
  • Fix general compilation issues
  • Implement thread-local storage (instead of TlsAlloc, TlsFree,TlsGetValue, TlsSetValue) ([linux-port] Thread-local storage #173)
  • Launch Appveyor and Travis buildbots. Appveyor to provide Windows builds and Travis to provide clang and gcc builds on Linux. ([linux-port] Fix Appveyor and Travis for the Linux branch #177)
  • Minimal supported GCC/Clang version ([linux] Minimum supported GCC/Clang version #196)
  • Resolve platform-specific issues in dxc.cpp in order to get the DXC executable working on Linux.
  • Get SPIR-V CodeGen test working on Linux ([linux-port] Get SPIRV CodeGen tests running. #193)
  • Use alternate thread-safe mechanisms (Thread-safe mechanisms not fully implemented on non-Win32 #198)
    • Use llvm::sys::Atomic* instead of InterlockedIncrement, InterlockedDecrement
    • Find an alternative for CriticalSection
  • Address compiler warnings (Reduce or eliminate warnings on GCC and Clang #206)
  • To be continued.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions