Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k4sAz-0004aI-B5 for pljava-dev@arkaria.postgresql.org; Sun, 09 Aug 2020 20:44:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k4sAx-0007Ka-7L for pljava-dev@arkaria.postgresql.org; Sun, 09 Aug 2020 20:44:15 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k4sAx-0007KT-0K for pljava-dev@lists.postgresql.org; Sun, 09 Aug 2020 20:44:15 +0000 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1k4sAp-0001HS-1d for pljava-dev@lists.postgresql.org; Sun, 09 Aug 2020 20:44:13 +0000 Received: by mail-ej1-x62d.google.com with SMTP id l4so7356707ejd.13 for ; Sun, 09 Aug 2020 13:44:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Q+xwdz5qS852NPgVdkS5D0d6WZxG5IUFqmbYtbeeqoY=; b=WQ26OX/hOQwRL9HyUadRriEsbdlMuzReBo7fitgf9q9ZX95pqpT5uhz3F+or+BZkK5 T4kAw6BZ5yPLbKu+VfLtQRB/GyE8nODy+vNHpZQdlActviKaDkn5NDwK6BTaFAKpN66d DKrwbYL4jKCSZx+dS9Zy/MsIM0EkXBZ/7emP378arEZWLqEPYiwpPk2gE9Em53HyTJf2 Y0BIwSZXWjxREsALI/SrmWhc+iOoG5LNrttpmpWzLh/4vMRU0AYQiea5t4BnKMY7L+Tj Zn/n06QDTTh0pblNkgqlBQt9hkviOjCX4jno/6rvpadbexRv5VjXOx2uEtR6DsgF41Mc pBjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Q+xwdz5qS852NPgVdkS5D0d6WZxG5IUFqmbYtbeeqoY=; b=MuZvy1d5K295waC1mwRlm3ggsknYyMKoWvogKt1u0zQ7GHXNM+FAjK/d+x7KgocqPX yZK5lZzypEFIjTruh+oWXgbiL79nH7q5AKLaSEGQ3sofzqpb1YLtauAJlpYpg0ciHHuw 3+8s3MYBqGaRLe6ibwSo5RmZquXjyScZNbe4Gl/xmulANkO0ETge23RxwVGimqQiyktf cFaj1DyBukaq0fSdgtTG68ctUS24Xo56UZBVAjU+RMCM/n5GCscspWSdf6ht909Eu1mX 47r/pBH3OD642eiSHXhzl2Gt0OqECkXexPiKMNPWBQNJr2umNO5Gz6P/x4AlkKz+gwlq 4Veg== X-Gm-Message-State: AOAM531DFGgW3Q52m/plwypaieTO43VH0fx9oii15l2Po057+W0ZYmlz r2DFKQdNGo02uv9csuYddWhf13B61kCycdB3+Cox6WL5 X-Google-Smtp-Source: ABdhPJx25DTm923OvB+JuYOEz1p81wkw3/dIcx2jXbA/HTwEwQa/BTbDLDTmd+9KjdHzhLrOhcVZmvgw8qsNi5pOG1Y= X-Received: by 2002:a17:907:4303:: with SMTP id nh3mr19423716ejb.520.1597005843228; Sun, 09 Aug 2020 13:44:03 -0700 (PDT) MIME-Version: 1.0 References: <5F22DF79.2090701@anastigmatix.net> <5F230337.3040406@anastigmatix.net> <5F232EBB.9030208@anastigmatix.net> <5F278CCE.1090006@anastigmatix.net> <5F2897AF.9040909@anastigmatix.net> <5F2A29E4.2000803@anastigmatix.net> <5F2EB313.8090706@anastigmatix.net> <5F2EE97B.1030108@anastigmatix.net> In-Reply-To: From: Kartik Ohri Date: Mon, 10 Aug 2020 02:13:51 +0530 Message-ID: Subject: Re: PL/Java new build plugin To: Chapman Flack Cc: pljava-dev@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000fd6c3905ac77e516" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --000000000000fd6c3905ac77e516 Content-Type: text/plain; charset="UTF-8" Hi! I went through nar's source and seems to be just a lot of abstraction and generalization to support different use cases. I extracted the following commands from Nar Maven's build process https://gist.github.com/amCap1712/f6c643a25c9d8d1dcaa429e62a81c27a. It basically boils down to invoking the compiler with the given flags, includes and files. And then link the created object files to create the shared library. The jar part is created by the maven-jar-plugin which I am not yet sure about how to use. For the initial iteration, I am planning to expose a CC object with functions to add the includes and the flags manually. I think this could benefit from the profile detecting function so I'll write it first then. I assume that all files in the pljava-so are going to be compiled. Then, call the linker on the generated files. Once the .so file is available, we can generalize our implementation from there as needed. Regards, Kartik > --000000000000fd6c3905ac77e516 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi!

I went through nar's= source and seems to be just a lot of abstraction and generalization to sup= port different use cases. I extracted the following commands from Nar Maven= 's build process=C2=A0https://gist.github.com/amC= ap1712/f6c643a25c9d8d1dcaa429e62a81c27a. It basically boils down to inv= oking the compiler with the given flags, includes and files. And then link = the created object files to create the shared library. The jar part is crea= ted by the maven-jar-plugin which I am not yet sure=C2=A0about how to use.<= /div>

For the initial iteration, I am planning to expose= a CC object with functions to add the includes and the flags manually. I t= hink this could benefit from the profile detecting function so I'll wri= te it first then. I assume that all files in the pljava-so are going to be = compiled. Then, call the linker on the generated files. Once the .so file i= s available, we can generalize our implementation from there as needed.

Regards,
Kartik
--000000000000fd6c3905ac77e516--