diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e0295c6..dcc592b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -92,48 +92,48 @@ jobs: asset_name: san-${{ github.event.release.tag_name }}-ubuntu-binaries.tar.gz asset_content_type: application/tar+gzip - build-windows: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [windows-latest] - - steps: - - uses: actions/checkout@v2 - with: - submodules: true - path: "." - - - uses: ilammy/msvc-dev-cmd@v1 - - - name: Install 7-zip - run: choco install -y 7zip - - - name: Create Build Environment - run: cmake -E make_directory ${{runner.workspace}}/build - - - name: Configure CMake - shell: powershell - working-directory: ${{runner.workspace}}/build - run: cmake $env:GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Release - - - name: Build - working-directory: ${{runner.workspace}}/build - shell: powershell - run: cmake --build . --config Release - - - name: Move bin/Release/san.exe to bin/san.exe - run: mv -Force "$env:GITHUB_WORKSPACE/bin/Release/san.exe" "$env:GITHUB_WORKSPACE/bin/san.exe" - - - name: Compress files - run: 7z a -y san-windows-binaries.zip std bin/san.exe examples internal - - - name: Upload the artifact - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: san-windows-binaries.zip - asset_name: san-${{ github.event.release.tag_name }}-windows-binaries.zip - asset_content_type: application/zip + # build-windows: + # runs-on: ${{ matrix.os }} + # strategy: + # matrix: + # os: [windows-latest] + + # steps: + # - uses: actions/checkout@v2 + # with: + # submodules: true + # path: "." + + # - uses: ilammy/msvc-dev-cmd@v1 + + # - name: Install 7-zip + # run: choco install -y 7zip + + # - name: Create Build Environment + # run: cmake -E make_directory ${{runner.workspace}}/build + + # - name: Configure CMake + # shell: powershell + # working-directory: ${{runner.workspace}}/build + # run: cmake $env:GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Release + + # - name: Build + # working-directory: ${{runner.workspace}}/build + # shell: powershell + # run: cmake --build . --config Release + + # - name: Move bin/Release/san.exe to bin/san.exe + # run: mv -Force "$env:GITHUB_WORKSPACE/bin/Release/san.exe" "$env:GITHUB_WORKSPACE/bin/san.exe" + + # - name: Compress files + # run: 7z a -y san-windows-binaries.zip std bin/san.exe examples internal + + # - name: Upload the artifact + # uses: actions/upload-release-asset@v1 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # with: + # upload_url: ${{ github.event.release.upload_url }} + # asset_path: san-windows-binaries.zip + # asset_name: san-${{ github.event.release.tag_name }}-windows-binaries.zip + # asset_content_type: application/zip diff --git a/dist-debian/libantlr4-runtime.so.4.8 b/dist-debian/libantlr4-runtime.so.4.8 new file mode 100755 index 0000000..1827971 Binary files /dev/null and b/dist-debian/libantlr4-runtime.so.4.8 differ diff --git a/include/san/Linker.hpp b/include/san/Linker.hpp index 021b3b3..8573bcf 100644 --- a/include/san/Linker.hpp +++ b/include/san/Linker.hpp @@ -73,6 +73,8 @@ class Linker if (os == "windows") { + std::cout << "windows!" << std::endl; + // for (auto &library : libraries) // { // auto option = "-l" + library; diff --git a/src/Compiler.cpp b/src/Compiler.cpp index 0f84026..f86c81f 100644 --- a/src/Compiler.cpp +++ b/src/Compiler.cpp @@ -54,20 +54,23 @@ std::vector San::Compiler::generate_objects(const std::string &os, return {}; } - llvm::PassBuilder builder; - llvm::LoopAnalysisManager loop_analisys_manager(false); - llvm::FunctionAnalysisManager function_analisys_manager(false); - llvm::CGSCCAnalysisManager CGSCC_analisys_manager(false); - llvm::ModuleAnalysisManager module_analisys_manager(false); - - builder.registerModuleAnalyses(module_analisys_manager); - builder.registerCGSCCAnalyses(CGSCC_analisys_manager); - builder.registerFunctionAnalyses(function_analisys_manager); - builder.registerLoopAnalyses(loop_analisys_manager); - builder.crossRegisterProxies(loop_analisys_manager, function_analisys_manager, CGSCC_analisys_manager, module_analisys_manager); - - llvm::ModulePassManager module_pass_manager = builder.buildModuleOptimizationPipeline(optimization_level); - module_pass_manager.run(*module, module_analisys_manager); + if (optimization_level != llvm::PassBuilder::OptimizationLevel::O0) + { + llvm::PassBuilder builder; + llvm::LoopAnalysisManager loop_analisys_manager(true); + llvm::FunctionAnalysisManager function_analisys_manager(true); + llvm::CGSCCAnalysisManager CGSCC_analisys_manager(true); + llvm::ModuleAnalysisManager module_analisys_manager(true); + + builder.registerModuleAnalyses(module_analisys_manager); + builder.registerCGSCCAnalyses(CGSCC_analisys_manager); + builder.registerFunctionAnalyses(function_analisys_manager); + builder.registerLoopAnalyses(loop_analisys_manager); + builder.crossRegisterProxies(loop_analisys_manager, function_analisys_manager, CGSCC_analisys_manager, module_analisys_manager); + + llvm::ModulePassManager module_pass_manager = builder.buildPerModuleDefaultPipeline(optimization_level, true); + module_pass_manager.run(*module, module_analisys_manager); + } llvm::legacy::PassManager pass;