[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-17 Thread Jan Leyonberg via cfe-commits
https://github.com/jsjodin closed https://github.com/llvm/llvm-project/pull/94763 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-13 Thread Sergio Afonso via cfe-commits
@@ -223,9 +223,12 @@ class CodeGenAction : public FrontendAction { std::unique_ptr llvmCtx; std::unique_ptr llvmModule; - /// Embeds offload objects given with specified with -fembed-offload-object + /// Embeds offload objects specified with -fembed-offload-object voi

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-13 Thread Jan Leyonberg via cfe-commits
https://github.com/jsjodin updated https://github.com/llvm/llvm-project/pull/94763 >From adfeb69ba312e971cb4eae71f185f38b1cac9b8f Mon Sep 17 00:00:00 2001 From: Jan Leyonberg Date: Wed, 5 Jun 2024 10:56:41 -0400 Subject: [PATCH 1/4] [flang] Add -mlink-builtin-bitcode option to fc1 This patch e

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-12 Thread Andrzej Warzyński via cfe-commits
https://github.com/banach-space approved this pull request. https://github.com/llvm/llvm-project/pull/94763 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-12 Thread Mats Petersson via cfe-commits
https://github.com/Leporacanthicus approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/94763 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-12 Thread Jan Leyonberg via cfe-commits
https://github.com/jsjodin updated https://github.com/llvm/llvm-project/pull/94763 >From adfeb69ba312e971cb4eae71f185f38b1cac9b8f Mon Sep 17 00:00:00 2001 From: Jan Leyonberg Date: Wed, 5 Jun 2024 10:56:41 -0400 Subject: [PATCH 1/3] [flang] Add -mlink-builtin-bitcode option to fc1 This patch e

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-12 Thread Jan Leyonberg via cfe-commits
@@ -0,0 +1,15 @@ +! Test -mlink-builtin-bitcode flag +! RUN: %flang -emit-llvm -c -o %t.bc %S/Inputs/libfun.f90 +! RUN: %flang_fc1 -emit-llvm -o - -mlink-builtin-bitcode %t.bc %s 2>&1 | FileCheck %s + +! CHECK: define internal void @libfun_ + +! RUN: not %flang_fc1 -emit-llvm -tr

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-11 Thread Mats Petersson via cfe-commits
https://github.com/Leporacanthicus commented: Nit-pick, otherwise OK by me. https://github.com/llvm/llvm-project/pull/94763 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-11 Thread Mats Petersson via cfe-commits
https://github.com/Leporacanthicus edited https://github.com/llvm/llvm-project/pull/94763 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-11 Thread Mats Petersson via cfe-commits
@@ -0,0 +1,15 @@ +! Test -mlink-builtin-bitcode flag +! RUN: %flang -emit-llvm -c -o %t.bc %S/Inputs/libfun.f90 +! RUN: %flang_fc1 -emit-llvm -o - -mlink-builtin-bitcode %t.bc %s 2>&1 | FileCheck %s + +! CHECK: define internal void @libfun_ + +! RUN: not %flang_fc1 -emit-llvm -tr

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-11 Thread via cfe-commits
https://github.com/agozillon approved this pull request. LGTM, but please do wait on the other more knowledgeable reviewers approvals :-) https://github.com/llvm/llvm-project/pull/94763 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-11 Thread Jan Leyonberg via cfe-commits
@@ -0,0 +1,18 @@ + +!-- +! RUN lines +!-- +! Embed something that can be easily checked +! RUN: %flang_fc1 -emit-llvm -triple x86_64-unknown-linux-gnu -o - -mlink-builtin-bitcode %S/Inputs/bclib.bc %s 2>&1 | FileCheck %s + +! CHECK: define internal void @libfun_ +

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-11 Thread Jan Leyonberg via cfe-commits
@@ -0,0 +1,18 @@ + +!-- +! RUN lines +!-- +! Embed something that can be easily checked +! RUN: %flang_fc1 -emit-llvm -triple x86_64-unknown-linux-gnu -o - -mlink-builtin-bitcode %S/Inputs/bclib.bc %s 2>&1 | FileCheck %s + +! CHECK: define internal void @libfun_ +

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-11 Thread Jan Leyonberg via cfe-commits
https://github.com/jsjodin updated https://github.com/llvm/llvm-project/pull/94763 >From adfeb69ba312e971cb4eae71f185f38b1cac9b8f Mon Sep 17 00:00:00 2001 From: Jan Leyonberg Date: Wed, 5 Jun 2024 10:56:41 -0400 Subject: [PATCH 1/2] [flang] Add -mlink-builtin-bitcode option to fc1 This patch e

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-10 Thread Jan Leyonberg via cfe-commits
https://github.com/jsjodin edited https://github.com/llvm/llvm-project/pull/94763 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-10 Thread Jan Leyonberg via cfe-commits
jsjodin wrote: Yes, it should be possible to add a command to generate the .bc file, that is probably a better option anyway since we would avoid specifying the triple. https://github.com/llvm/llvm-project/pull/94763 ___

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-10 Thread Jan Leyonberg via cfe-commits
@@ -1146,6 +1150,54 @@ void CodeGenAction::embedOffloadObjects() { } } +void CodeGenAction::linkBuiltinBCLibs() { jsjodin wrote: It does come from clang but it is distributed across a few classes with a lot more options, so there was not simple way to simp

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-10 Thread Jan Leyonberg via cfe-commits
@@ -0,0 +1,18 @@ + +!-- +! RUN lines +!-- +! Embed something that can be easily checked +! RUN: %flang_fc1 -emit-llvm -triple x86_64-unknown-linux-gnu -o - -mlink-builtin-bitcode %S/Inputs/bclib.bc %s 2>&1 | FileCheck %s jsjodin wrote: The triple

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-09 Thread Andrzej Warzyński via cfe-commits
@@ -1146,6 +1150,54 @@ void CodeGenAction::embedOffloadObjects() { } } +void CodeGenAction::linkBuiltinBCLibs() { banach-space wrote: +1 https://github.com/llvm/llvm-project/pull/94763 ___ cfe-commits mailing lis

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-09 Thread Andrzej Warzyński via cfe-commits
@@ -0,0 +1,18 @@ + +!-- +! RUN lines +!-- +! Embed something that can be easily checked +! RUN: %flang_fc1 -emit-llvm -triple x86_64-unknown-linux-gnu -o - -mlink-builtin-bitcode %S/Inputs/bclib.bc %s 2>&1 | FileCheck %s + +! CHECK: define internal void @libfun_ +

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-09 Thread Andrzej Warzyński via cfe-commits
@@ -0,0 +1,18 @@ + +!-- +! RUN lines +!-- +! Embed something that can be easily checked +! RUN: %flang_fc1 -emit-llvm -triple x86_64-unknown-linux-gnu -o - -mlink-builtin-bitcode %S/Inputs/bclib.bc %s 2>&1 | FileCheck %s banach-space wrote: 1. Wh

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-09 Thread Andrzej Warzyński via cfe-commits
@@ -0,0 +1,18 @@ + +!-- +! RUN lines +!-- banach-space wrote: In the past, folks asked not to add such comments in tests. Let's stick with that. https://github.com/llvm/llvm-project/pull/94763 ___ cfe-

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-09 Thread Andrzej Warzyński via cfe-commits
@@ -0,0 +1,18 @@ + +!-- +! RUN lines +!-- +! Embed something that can be easily checked +! RUN: %flang_fc1 -emit-llvm -triple x86_64-unknown-linux-gnu -o - -mlink-builtin-bitcode %S/Inputs/bclib.bc %s 2>&1 | FileCheck %s + +! CHECK: define internal void @libfun_ +

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-07 Thread Mats Petersson via cfe-commits
@@ -1146,6 +1150,54 @@ void CodeGenAction::embedOffloadObjects() { } } +void CodeGenAction::linkBuiltinBCLibs() { Leporacanthicus wrote: This is a fairly large chunk of code - does it come from Clang in some way - if so, is it possible to have one common f

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-07 Thread Mats Petersson via cfe-commits
https://github.com/Leporacanthicus edited https://github.com/llvm/llvm-project/pull/94763 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-07 Thread Mats Petersson via cfe-commits
Leporacanthicus wrote: Would it be possible to generate this, rather than supply it as a binary - just out of safety-concerns with binaries, really. I expect the contents isn't particularly complex or time-consuming to build. https://github.com/llvm/llvm-proj

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-07 Thread Mats Petersson via cfe-commits
https://github.com/Leporacanthicus commented: Overall looks good. Minor nits on "binary files in repo" and duplication of code [although I couldn't find the corresponding bit in Clang - I didn't spend much time on searching for it]. https://github.com/llvm/llvm-project/pull/94763 _

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-driver @llvm/pr-subscribers-clang Author: Jan Leyonberg (jsjodin) Changes This patch enables the -mlink-builtin-bitcode flag in fc1 so that bitcode libraries can be linked in. This is needed for OpenMP offloading libraries. --- Full diff: https:/

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-07 Thread Jan Leyonberg via cfe-commits
https://github.com/jsjodin created https://github.com/llvm/llvm-project/pull/94763 This patch enables the -mlink-builtin-bitcode flag in fc1 so that bitcode libraries can be linked in. This is needed for OpenMP offloading libraries. >From adfeb69ba312e971cb4eae71f185f38b1cac9b8f Mon Sep 17 00: